diff options
| author | Ken D'Ambrosio <ken@jots.org> | 2026-05-09 15:53:18 +0000 |
|---|---|---|
| committer | Ken D'Ambrosio <ken@jots.org> | 2026-05-09 15:53:18 +0000 |
| commit | fa36e54d878a3274f7728eb0b84c351b33f3c6ed (patch) | |
| tree | ab141eeecd013ec9e2eeb0ac919dbc84cd328c90 /public/js/album.js | |
| parent | b1ffa9050e63329ac72cfc9cca5b44800984e34c (diff) | |
Fix taken_at timezone: store and display as camera local time
EXIF DateTimeOriginal has no timezone — it's the camera's wall clock.
Storing it via .iso8601 attached +00:00 (server TZ), causing browsers
to shift the time to their local zone when parsing. Switch to
strftime('%Y-%m-%dT%H:%M:%S') so no offset is written. JS strips any
existing +00:00 suffix from already-stored values so old data is also
displayed correctly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'public/js/album.js')
| -rw-r--r-- | public/js/album.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/public/js/album.js b/public/js/album.js index 9e921d7..fe492af 100644 --- a/public/js/album.js +++ b/public/js/album.js @@ -38,7 +38,7 @@ function lbBuildInfo(e) { const rows = []; if (e.name !== e.title) rows.push(['File', e.name]); if (e.taken_at) { - const d = new Date(e.taken_at); + const d = new Date(e.taken_at.replace(/[+-]\d{2}:\d{2}$|Z$/, '')); rows.push(['Date', d.toLocaleString(undefined, { dateStyle: 'medium', timeStyle: 'short' })]); } if (e.width && e.height) rows.push(['Dimensions', `${e.width} × ${e.height}`]); |
