fix(movie/show.php.liquid): localize last watched dates to America/Los_Angeles

This commit is contained in:
Cory Dransfeldt 2025-04-26 20:48:47 -07:00
parent ea6d1c9284
commit 4958c7fe66
No known key found for this signature in database
4 changed files with 13 additions and 5 deletions

View file

@ -36,7 +36,11 @@ schema: movie
<span class="sub-meta tattoo">{% tablericon "needle" %} I have a tattoo inspired by this movie!</span>
<?php endif; ?>
<?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; ?>
</div>
<?php if (!empty($movie["review"])): ?>