[BUG] web: changing asset location changes asset time zone #1875

Closed
opened 2026-02-05 04:16:46 +03:00 by OVERLORD · 10 comments
Owner

Originally created by @waclaw66 on GitHub (Dec 23, 2023).

The bug

Asset has TZ +03:00 within exif data of the original file, no GPS location is present.
When a new location is set, TZ is changed to current TZ of that location, without respect of original date and DST.

The OS that Immich Server is running on

Fedora 39

Version of Immich Server

v.1.91.4

Version of Immich Mobile App

not relevant

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

not relevant

Your .env content

not relevant

Reproduction steps

explained above

Additional information

No response

Originally created by @waclaw66 on GitHub (Dec 23, 2023). ### The bug Asset has TZ +03:00 within exif data of the original file, no GPS location is present. When a new location is set, TZ is changed to current TZ of that location, without respect of original date and DST. ### The OS that Immich Server is running on Fedora 39 ### Version of Immich Server v.1.91.4 ### Version of Immich Mobile App not relevant ### Platform with the issue - [ ] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML not relevant ``` ### Your .env content ```Shell not relevant ``` ### Reproduction steps ```bash explained above ``` ### Additional information _No response_
Author
Owner

@bo0tzz commented on GitHub (Dec 23, 2023):

Immich uses exiftool for determining the time(zone) of an asset, which I believe takes location into account as well.

@bo0tzz commented on GitHub (Dec 23, 2023): Immich uses exiftool for determining the time(zone) of an asset, which I believe takes location into account as well.
Author
Owner

@waclaw66 commented on GitHub (Dec 23, 2023):

Is exiftool used again for jpeg+xmp, when a new location is set?
When xmp is deleted and metadata refreshed, time returns to the original timezone.

@waclaw66 commented on GitHub (Dec 23, 2023): Is exiftool used again for jpeg+xmp, when a new location is set? When xmp is deleted and metadata refreshed, time returns to the original timezone.
Author
Owner

@waclaw66 commented on GitHub (Dec 23, 2023):

Example picture 20111006_153004_IMG_5579

@waclaw66 commented on GitHub (Dec 23, 2023): Example picture [20111006_153004_IMG_5579](https://github.com/immich-app/immich/assets/15554561/ab373c42-6f24-4d70-8170-6e655968ba0e)
Author
Owner

@jrasm91 commented on GitHub (Sep 6, 2024):

GPS data is almost always assumed to be the most accurate way to determining an image's time zone. This image has "DateTimeOriginal": "2011:10:06 15:30:04", which does not include any offset, so it is assumed to be local time. The fact that is it adjusted based off of location is expected behavior.

@jrasm91 commented on GitHub (Sep 6, 2024): GPS data is almost always assumed to be the most accurate way to determining an image's time zone. This image has `"DateTimeOriginal": "2011:10:06 15:30:04",` which does not include any offset, so it is assumed to be local time. The fact that is it adjusted based off of location is expected behavior.
Author
Owner

@waclaw66 commented on GitHub (Sep 6, 2024):

This image has "DateTimeOriginal": "2011:10:06 15:30:04", which does not include any offset, so it is assumed to be local time. The fact that is it adjusted based off of location is expected behavior.

The example image has Time Zone Offset: 3 and timezone is properly displayed before adding location...

before after
obrazek obrazek
obrazek obrazek

Current behaviour is not expected. Image timezone is overwritten by location TZ within Immich DB exif table and then not interperted and shown correctly (see Immich and DB table screenshots). There is shown Europe/Prague (+02:00) although Asia/Jerusalem is stored. This is definitele a bug.

Exiftool info:

ExifTool Version Number         : 12.67
File Name                       : 292635326-ab373c42-6f24-4d70-8170-6e655968ba0e.jpg
Directory                       : .
File Size                       : 5.3 MB
Zone Identifier                 : Exists
File Modification Date/Time     : 2024:09:06 17:21:12+02:00
File Access Date/Time           : 2024:09:06 17:22:31+02:00
File Creation Date/Time         : 2024:09:06 17:21:12+02:00
File Permissions                : -rw-rw-rw-
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Image Description               :
Make                            : Canon
Camera Model Name               : Canon PowerShot SX10 IS
Orientation                     : Horizontal (normal)
X Resolution                    : 180
Y Resolution                    : 180
Resolution Unit                 : inches
Modify Date                     : 2011:10:06 15:30:04
Y Cb Cr Positioning             : Co-sited
Exposure Time                   : 1/500
F Number                        : 4.0
ISO                             : 80
Time Zone Offset                : 3
Exif Version                    : 0221
Date/Time Original              : 2011:10:06 15:30:04
Create Date                     : 2011:10:06 15:30:04
Components Configuration        : Y, Cb, Cr, -
Compressed Bits Per Pixel       : 5
Shutter Speed Value             : 1/501
Aperture Value                  : 4.0
Max Aperture Value              : 2.8
Flash                           : Off, Did not fire
Focal Length                    : 5.0 mm
Macro Mode                      : Normal
Self Timer                      : Off
Quality                         : Superfine
Canon Flash Mode                : Off
Continuous Drive                : Single
Focus Mode                      : Single
Record Mode                     : JPEG
Canon Image Size                : Large
Easy Mode                       : Full auto
Digital Zoom                    : None
Contrast                        : Normal
Saturation                      : Normal
Sharpness                       : 0
Camera ISO                      : Auto
Metering Mode                   : Evaluative
Focus Range                     : Auto
AF Point                        : Face Detect
Canon Exposure Mode             : Easy
Lens Type                       : n/a
Max Focal Length                : 100 mm
Min Focal Length                : 5 mm
Focal Units                     : 100/mm
Max Aperture                    : 2.8
Min Aperture                    : 9
Flash Activity                  : 0
Flash Bits                      : (none)
Focus Continuous                : Continuous
AE Setting                      : Normal AE
Image Stabilization             : On
Zoom Source Width               : 3648
Zoom Target Width               : 3648
Spot Metering Mode              : Center
Manual Flash Output             : n/a
Focal Type                      : Zoom
Focal Plane X Size              : 6.27 mm
Focal Plane Y Size              : 4.70 mm
Auto ISO                        : 75
Base ISO                        : 100
Measured EV                     : 14.28
Target Aperture                 : 4
Target Exposure Time            : 1/501
Exposure Compensation           : 0
White Balance                   : Auto
Slow Shutter                    : Off
Shot Number In Continuous Burst : 0
Optical Zoom Code               : 0
Flash Guide Number              : 0
Flash Exposure Compensation     : 0
Auto Exposure Bracketing        : Off
AEB Bracket Value               : 0
Control Mode                    : Camera Local Control
Focus Distance Upper            : 4.3 m
Focus Distance Lower            : 0 m
Bulb Duration                   : 0
Camera Type                     : Compact
Auto Rotate                     : None
ND Filter                       : Off
Self Timer 2                    : 0
Flash Output                    : 0
Canon Image Type                : IMG:PowerShot SX10 IS JPEG
Canon Firmware Version          : Firmware Version 1.01
File Number                     : 102-5579
Owner Name                      :
Rotation                        : 0
Camera Temperature              : 35 C
Canon Model ID                  : PowerShot SX10 IS
AF Area Mode                    : Single-point AF
Num AF Points                   : 9
Valid AF Points                 : 1
Canon Image Width               : 3648
Canon Image Height              : 2736
AF Image Width                  : 100
AF Image Height                 : 100
AF Area Widths                  : 18 -126 45 -127 -126 -96 45 -127 0
AF Area Heights                 : 18 0 0 45 45 24576 0 820 0
AF Area X Positions             : 0 0 -96 -126 45 -127 0 -126 0
AF Area Y Positions             : 0 0 0 24576 0 1630 0 0 0
AF Points In Focus              : 0
Primary AF Point                : 0
Thumbnail Image Valid Area      : 0 0 0 0
Super Macro                     : Off
Date Stamp Mode                 : Off
My Color Mode                   : Off
Firmware Revision               : 1.01 rev 1.00
Categories                      : (none)
Intelligent Contrast            : Off
Image Unique ID                 : acc16b2389d3caf246ec458ffd176159
VRD Offset                      : 0
User Comment                    :
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 3648
Exif Image Height               : 2736
Interoperability Index          : R98 - DCF basic file (sRGB)
Interoperability Version        : 0100
Related Image Width             : 3648
Related Image Height            : 2736
Focal Plane X Resolution        : 15136.92946
Focal Plane Y Resolution        : 15116.0221
Focal Plane Resolution Unit     : inches
Sensing Method                  : One-chip color area
File Source                     : Digital Camera
Custom Rendered                 : Normal
Exposure Mode                   : Auto
Digital Zoom Ratio              : 1
Scene Capture Type              : Standard
Compression                     : JPEG (old-style)
Thumbnail Offset                : 3414
Thumbnail Length                : 5569
Image Width                     : 3648
Image Height                    : 2736
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:2 (2 1)
Drive Mode                      : Single-frame Shooting
Lens                            : 5.0 - 100.0 mm
Shooting Mode                   : Full auto
Aperture                        : 4.0
Image Size                      : 3648x2736
Lens ID                         : Unknown 5-100mm
Megapixels                      : 10.0
Scale Factor To 35 mm Equivalent: 5.7
Shutter Speed                   : 1/500
Thumbnail Image                 : (Binary data 5569 bytes, use -b option to extract)
Lens                            : 5.0 - 100.0 mm (35 mm equivalent: 28.3 - 565.2 mm)
Circle Of Confusion             : 0.005 mm
Depth Of Field                  : inf (0.76 m - inf)
Field Of View                   : 65.0 deg
Focal Length                    : 5.0 mm (35 mm equivalent: 28.3 mm)
Hyperfocal Distance             : 1.18 m
Light Value                     : 13.3
@waclaw66 commented on GitHub (Sep 6, 2024): > This image has `"DateTimeOriginal": "2011:10:06 15:30:04",` which does not include any offset, so it is assumed to be local time. The fact that is it adjusted based off of location is expected behavior. The example image has `Time Zone Offset: 3` and timezone is properly displayed before adding location... |before|after| |-|-| |![obrazek](https://github.com/user-attachments/assets/49fa72dd-5756-4407-9966-baf57303cfc5)|![obrazek](https://github.com/user-attachments/assets/1b7cacc3-73ad-4b70-a479-64644ffa3f76)| |![obrazek](https://github.com/user-attachments/assets/b3700411-ec24-4dc5-bac6-6dcb032bc82d)|![obrazek](https://github.com/user-attachments/assets/0d894069-66ca-4780-b9d7-abf463a8d11f)| Current behaviour is not expected. Image timezone is overwritten by location TZ within Immich DB exif table and then not interperted and shown correctly (see Immich and DB table screenshots). There is shown `Europe/Prague (+02:00)` although `Asia/Jerusalem` is stored. This is definitele a bug. Exiftool info: ``` ExifTool Version Number : 12.67 File Name : 292635326-ab373c42-6f24-4d70-8170-6e655968ba0e.jpg Directory : . File Size : 5.3 MB Zone Identifier : Exists File Modification Date/Time : 2024:09:06 17:21:12+02:00 File Access Date/Time : 2024:09:06 17:22:31+02:00 File Creation Date/Time : 2024:09:06 17:21:12+02:00 File Permissions : -rw-rw-rw- File Type : JPEG File Type Extension : jpg MIME Type : image/jpeg Exif Byte Order : Little-endian (Intel, II) Image Description : Make : Canon Camera Model Name : Canon PowerShot SX10 IS Orientation : Horizontal (normal) X Resolution : 180 Y Resolution : 180 Resolution Unit : inches Modify Date : 2011:10:06 15:30:04 Y Cb Cr Positioning : Co-sited Exposure Time : 1/500 F Number : 4.0 ISO : 80 Time Zone Offset : 3 Exif Version : 0221 Date/Time Original : 2011:10:06 15:30:04 Create Date : 2011:10:06 15:30:04 Components Configuration : Y, Cb, Cr, - Compressed Bits Per Pixel : 5 Shutter Speed Value : 1/501 Aperture Value : 4.0 Max Aperture Value : 2.8 Flash : Off, Did not fire Focal Length : 5.0 mm Macro Mode : Normal Self Timer : Off Quality : Superfine Canon Flash Mode : Off Continuous Drive : Single Focus Mode : Single Record Mode : JPEG Canon Image Size : Large Easy Mode : Full auto Digital Zoom : None Contrast : Normal Saturation : Normal Sharpness : 0 Camera ISO : Auto Metering Mode : Evaluative Focus Range : Auto AF Point : Face Detect Canon Exposure Mode : Easy Lens Type : n/a Max Focal Length : 100 mm Min Focal Length : 5 mm Focal Units : 100/mm Max Aperture : 2.8 Min Aperture : 9 Flash Activity : 0 Flash Bits : (none) Focus Continuous : Continuous AE Setting : Normal AE Image Stabilization : On Zoom Source Width : 3648 Zoom Target Width : 3648 Spot Metering Mode : Center Manual Flash Output : n/a Focal Type : Zoom Focal Plane X Size : 6.27 mm Focal Plane Y Size : 4.70 mm Auto ISO : 75 Base ISO : 100 Measured EV : 14.28 Target Aperture : 4 Target Exposure Time : 1/501 Exposure Compensation : 0 White Balance : Auto Slow Shutter : Off Shot Number In Continuous Burst : 0 Optical Zoom Code : 0 Flash Guide Number : 0 Flash Exposure Compensation : 0 Auto Exposure Bracketing : Off AEB Bracket Value : 0 Control Mode : Camera Local Control Focus Distance Upper : 4.3 m Focus Distance Lower : 0 m Bulb Duration : 0 Camera Type : Compact Auto Rotate : None ND Filter : Off Self Timer 2 : 0 Flash Output : 0 Canon Image Type : IMG:PowerShot SX10 IS JPEG Canon Firmware Version : Firmware Version 1.01 File Number : 102-5579 Owner Name : Rotation : 0 Camera Temperature : 35 C Canon Model ID : PowerShot SX10 IS AF Area Mode : Single-point AF Num AF Points : 9 Valid AF Points : 1 Canon Image Width : 3648 Canon Image Height : 2736 AF Image Width : 100 AF Image Height : 100 AF Area Widths : 18 -126 45 -127 -126 -96 45 -127 0 AF Area Heights : 18 0 0 45 45 24576 0 820 0 AF Area X Positions : 0 0 -96 -126 45 -127 0 -126 0 AF Area Y Positions : 0 0 0 24576 0 1630 0 0 0 AF Points In Focus : 0 Primary AF Point : 0 Thumbnail Image Valid Area : 0 0 0 0 Super Macro : Off Date Stamp Mode : Off My Color Mode : Off Firmware Revision : 1.01 rev 1.00 Categories : (none) Intelligent Contrast : Off Image Unique ID : acc16b2389d3caf246ec458ffd176159 VRD Offset : 0 User Comment : Flashpix Version : 0100 Color Space : sRGB Exif Image Width : 3648 Exif Image Height : 2736 Interoperability Index : R98 - DCF basic file (sRGB) Interoperability Version : 0100 Related Image Width : 3648 Related Image Height : 2736 Focal Plane X Resolution : 15136.92946 Focal Plane Y Resolution : 15116.0221 Focal Plane Resolution Unit : inches Sensing Method : One-chip color area File Source : Digital Camera Custom Rendered : Normal Exposure Mode : Auto Digital Zoom Ratio : 1 Scene Capture Type : Standard Compression : JPEG (old-style) Thumbnail Offset : 3414 Thumbnail Length : 5569 Image Width : 3648 Image Height : 2736 Encoding Process : Baseline DCT, Huffman coding Bits Per Sample : 8 Color Components : 3 Y Cb Cr Sub Sampling : YCbCr4:2:2 (2 1) Drive Mode : Single-frame Shooting Lens : 5.0 - 100.0 mm Shooting Mode : Full auto Aperture : 4.0 Image Size : 3648x2736 Lens ID : Unknown 5-100mm Megapixels : 10.0 Scale Factor To 35 mm Equivalent: 5.7 Shutter Speed : 1/500 Thumbnail Image : (Binary data 5569 bytes, use -b option to extract) Lens : 5.0 - 100.0 mm (35 mm equivalent: 28.3 - 565.2 mm) Circle Of Confusion : 0.005 mm Depth Of Field : inf (0.76 m - inf) Field Of View : 65.0 deg Focal Length : 5.0 mm (35 mm equivalent: 28.3 mm) Hyperfocal Distance : 1.18 m Light Value : 13.3 ```
Author
Owner

@jrasm91 commented on GitHub (Sep 6, 2024):

What value is stored in the database for this asset in the timeZone column?

@jrasm91 commented on GitHub (Sep 6, 2024): What value is stored in the database for this asset in the timeZone column?
Author
Owner

@waclaw66 commented on GitHub (Sep 6, 2024):

What value is stored in the database for this asset in the timeZone column?

It's in the pictures above.

@waclaw66 commented on GitHub (Sep 6, 2024): > What value is stored in the database for this asset in the timeZone column? It's in the pictures above.
Author
Owner

@jrasm91 commented on GitHub (Sep 7, 2024):

All I see is a picture of the edit location modal. What is the raw value?

@jrasm91 commented on GitHub (Sep 7, 2024): All I see is a picture of the edit location modal. What is the raw value?
Author
Owner

@waclaw66 commented on GitHub (Sep 7, 2024):

In the pictures below the modal screenshots (white stripes).

@waclaw66 commented on GitHub (Sep 7, 2024): In the pictures below the modal screenshots (white stripes).
Author
Owner

@jrasm91 commented on GitHub (Sep 7, 2024):

Ah got it. I think the client converts this to an offset, which doesn't take daylight savings into account.

The server is working correctly, the client is not using timezones properly. I'm pretty sure we're tracking this in another issue though.

@jrasm91 commented on GitHub (Sep 7, 2024): Ah got it. I think the client converts this to an offset, which doesn't take daylight savings into account. The server is working correctly, the client is not using timezones properly. I'm pretty sure we're tracking this in another issue though.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1875