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 /scripts | |
| 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 'scripts')
| -rw-r--r-- | scripts/update.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/update.rb b/scripts/update.rb index 7ff0007..8e4cdd5 100644 --- a/scripts/update.rb +++ b/scripts/update.rb @@ -80,7 +80,7 @@ def enrich_image(full, name, meta) exif = MiniExiftool.new(full, numerical: false) raw = exif.date_time_original || exif.create_date || exif.date_time if raw - meta['taken_at'] = raw.respond_to?(:iso8601) ? raw.iso8601 : raw.to_s + meta['taken_at'] = raw.respond_to?(:strftime) ? raw.strftime('%Y-%m-%dT%H:%M:%S') : raw.to_s puts " #{name}: taken_at = #{meta['taken_at']}" end rescue StandardError => e |
