Frontend: Fix displayed date for photos without time zone

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-05-07 11:07:08 +02:00
parent 314d8878d2
commit 40ed6f118a

View file

@ -203,7 +203,7 @@ class Photo extends RestModel {
if (this.TimeZone) {
return DateTime.fromISO(this.TakenAt).setZone(this.TimeZone).toLocaleString(DateTime.DATETIME_FULL);
} else if (this.TakenAt) {
return DateTime.fromISO(this.TakenAt).toLocaleString(DateTime.DATE_HUGE);
return DateTime.fromISO(this.TakenAt).setZone("UTC").toLocaleString(DateTime.DATE_HUGE);
} else {
return "Unknown";
}