Skip to content

fix(mobile): missing conversion to UTC time zone - #3495

Merged
alextran1502 merged 1 commit into
immich-app:mainfrom
james58899:fix-backup-timezone
Aug 25, 2023
Merged

alextran1502 merged 1 commit into
immich-app:mainfrom
james58899:fix-backup-timezone

Conversation

@james58899

Copy link
Copy Markdown
Contributor

Because toIso8601String will lose the time zone information, if not converted to UTC the time will be incorrect.

@vercel

vercel Bot commented Aug 1, 2023 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
immich ⬜️ Ignored (Inspect) Aug 1, 2023 6:06am

@alextran1502

Copy link
Copy Markdown
Member

@james58899 Hello, can you please put an example of the current behavior vs. the changes that you made to the description of this PR?

@james58899

Copy link
Copy Markdown
Contributor Author

I had a problem like #1320, the date of the image was changed to a future time after upload, and the time difference was exactly the timezone (Exactly 8 hours later, my timezone is UTC+8).

@AngelaDMerkel

Copy link
Copy Markdown
Contributor

I have exactly this issue, and commented in #2953 with metadata.

@james58899

Copy link
Copy Markdown
Contributor Author

I have exactly this issue, and commented in #2953 with metadata.

This should be a different issue, this PR only fixes the incorrect file time when uploading on the mobile app.

Because the screenshot does not have exif data, the file time will be used.
However, the APP does not convert to UTC and flutter does not support the format including the time zone, so the server treats the local time as UTC and causes an error.

@jrasm91 jrasm91 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I paused my metadata extraction job and then took an image and backed it up. It does have the wrong fileCreatedAt timestamp. We do indeed want to send ISO dates with the trailing Z, which this library doesn't do unless it is first converted to utc.

@alextran1502
alextran1502 merged commit 2cccef1 into immich-app:main Aug 25, 2023
@james58899
james58899 deleted the fix-backup-timezone branch August 25, 2023 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants