fix(movie/show.php.liquid): localize last watched dates to America/Los_Angeles
This commit is contained in:
parent
ea6d1c9284
commit
4958c7fe66
4 changed files with 13 additions and 5 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"html-minifier-terser": "7.2.0",
|
"html-minifier-terser": "7.2.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
@ -36,7 +36,11 @@ schema: movie
|
||||||
<span class="sub-meta tattoo">{% tablericon "needle" %} I have a tattoo inspired by this movie!</span>
|
<span class="sub-meta tattoo">{% tablericon "needle" %} I have a tattoo inspired by this movie!</span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (!empty($movie["last_watched"])): ?>
|
<?php if (!empty($movie["last_watched"])): ?>
|
||||||
<span class="sub-meta">Last watched on <?= date('F j, Y', strtotime($movie["last_watched"])) ?>.</span>
|
<?php
|
||||||
|
$date = new DateTime($movie["last_watched"]);
|
||||||
|
$date->setTimezone(new DateTimeZone('America/Los_Angeles'));
|
||||||
|
?>
|
||||||
|
<span class="sub-meta">Last watched on <?= $date->format('F j, Y') ?>.</span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php if (!empty($movie["review"])): ?>
|
<?php if (!empty($movie["review"])): ?>
|
||||||
|
|
|
@ -33,7 +33,11 @@ schema: show
|
||||||
<span class="sub-meta tattoo">{% tablericon "needle" %} I have a tattoo inspired by this show!</span>
|
<span class="sub-meta tattoo">{% tablericon "needle" %} I have a tattoo inspired by this show!</span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (!empty($show["episode"]["formatted_episode"])): ?>
|
<?php if (!empty($show["episode"]["formatted_episode"])): ?>
|
||||||
<span class="sub-meta">I last watched <mark><?= htmlspecialchars($show["episode"]["formatted_episode"]) ?></mark> on <?= date('F j, Y', strtotime($show["episode"]["last_watched_at"])) ?>.</span>
|
<?php
|
||||||
|
$date = new DateTime($show["episode"]["last_watched_at"]);
|
||||||
|
$date->setTimezone(new DateTimeZone('America/Los_Angeles'));
|
||||||
|
?>
|
||||||
|
<span class="sub-meta">I last watched <mark><?= htmlspecialchars($show["episode"]["formatted_episode"]) ?></mark> on <?= $date->format('F j, Y') ?>.</span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php if (!empty($show["review"])): ?>
|
<?php if (!empty($show["review"])): ?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue