fix(server,web,mobile): Incorrectly record and show timestamp and time zone of the asset (#706)

Implemented a mechanism to extract the correct time zone from the GPS coordinate if presented in the file's EXIF, and to convert the timestamp to the correct UTC time so that the time will show correctly based on the mobile/web local time zone.
This commit is contained in:
Alex 2022-09-22 15:58:17 -05:00 committed by GitHub
parent fc194021a4
commit e5459b68ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 392 additions and 63 deletions

View file

@ -10,9 +10,6 @@ DB_DATABASE_NAME=immich
# Optional Database settings:
# DB_PORT=5432
###################################################################################
# Redis
###################################################################################
@ -25,33 +22,24 @@ REDIS_HOSTNAME=immich_redis
# REDIS_PASSWORD=
# REDIS_SOCKET=
###################################################################################
# Upload File Config
###################################################################################
UPLOAD_LOCATION=absolute_location_on_your_machine_where_you_want_to_store_the_backup
###################################################################################
# Log message level - [simple|verbose]
###################################################################################
LOG_LEVEL=simple
###################################################################################
# JWT SECRET
###################################################################################
JWT_SECRET=randomstringthatissolongandpowerfulthatnoonecanguess
###################################################################################
# MAPBOX
####################################################################################
@ -60,7 +48,6 @@ JWT_SECRET=randomstringthatissolongandpowerfulthatnoonecanguess
ENABLE_MAPBOX=false
MAPBOX_KEY=
####################################################################################
# WEB - Optional
####################################################################################
@ -69,11 +56,3 @@ MAPBOX_KEY=
# For example PUBLIC_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>"
PUBLIC_LOGIN_PAGE_MESSAGE=
# For correctly display your local time zone on the web, you can set the time zone here.
# Should work fine by default value, however, in case of incorrect timezone in EXIF, this value
# should be set to the correct timezone.
# Command to get timezone:
# - Linux: curl -s http://ip-api.com/json/ | grep -oP '(?<=timezone":")(.*?)(?=")'
# TZ=Etc/UTC

View file

@ -47,8 +47,6 @@ services:
entrypoint: ["/bin/sh", "./entrypoint.sh"]
env_file:
- .env
environment:
- PUBLIC_TZ=${TZ}
restart: always
redis: