Skip to content

Commit

Permalink
feat(server): parse offset from "Image_UTC_Data" (Samsung) (immich-ap…
Browse files Browse the repository at this point in the history
…p#13080)

* fix(deps): update dependency exiftool-vendored to v28.3.0

* feat(server): parse offset from "Image_UTC_Data" (Samsung)

A Samsung phone might provide the local time (e.g. 09:00) without any timezone or
offset information. If the file also includes the non-standard trailer tag
"TimeStamp" in "Image_UTC_Data", we can use the unix timestamp contained within to
deduce the offset.

As an example, if the local date/time is "2024-09-15T09:00" and the unix timestamp is
1726408800 (which is 2024-09-15T16:00 UTC), we know that the offset is -07:00.

The actual computation/fix is done in exiftool-vendored.

Also see
https://github.com/exiftool/exiftool/blob/0f63a780906abcccba796761fc2e66a0737e2f16/lib/Image/ExifTool/Samsung.pm#L996-L1001
photostructure/exiftool-vendored.js#209

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and Yosi Taguri committed Oct 3, 2024
1 parent 2efd7a5 commit 4028275
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 46 deletions.
33 changes: 17 additions & 16 deletions e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 30 additions & 30 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions server/src/repositories/metadata.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export class MetadataRepository implements IMetadataRepository {
defaultVideosToUTC: true,
backfillTimezones: true,
inferTimezoneFromDatestamps: true,
inferTimezoneFromTimeStamp: true,
useMWG: true,
numericTags: [...DefaultReadTaskOptions.numericTags, 'FocalLength'],
/* eslint unicorn/no-array-callback-reference: off, unicorn/no-array-method-this-argument: off */
Expand Down

0 comments on commit 4028275

Please sign in to comment.