From 62f4ff9645b58ffda54edd544e237024222714a3 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Thu, 10 Dec 2020 08:55:49 -0500 Subject: [PATCH] Fix timezone bug --- opendm/photo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendm/photo.py b/opendm/photo.py index 984e729f..5d7ba009 100644 --- a/opendm/photo.py +++ b/opendm/photo.py @@ -5,7 +5,7 @@ import os import exifread import numpy as np from six import string_types -from datetime import datetime, timedelta +from datetime import datetime, timedelta, timezone import pytz from opendm import io @@ -396,7 +396,7 @@ class ODM_Photo: def get_utc_time(self): if self.utc_time: - return datetime.utcfromtimestamp(self.utc_time / 1000) + return datetime.fromtimestamp(self.utc_time / 1000, timezone.utc) def get_photometric_exposure(self): # H ~= (exposure_time) / (f_number^2)