diff --git a/functions.py b/functions.py index 5eb6154..2195a94 100644 --- a/functions.py +++ b/functions.py @@ -41,7 +41,7 @@ class Radiation: def _time_conversion(self, timestamp, local_timezone): csv_naive_time = datetime.fromisoformat(timestamp) # Set timezone - csv_aware_time = csv_naive_time.astimezone(local_timezone) + csv_aware_time = csv_naive_time.localize(local_timezone) return csv_aware_time def _radiation_conversion(self, radiation, si_factor): @@ -102,7 +102,7 @@ class Photo: # date.value creates datetime object in pic_naive_time pic_naive_time = date.value # Set timezone - pic_aware_time = pic_naive_time.astimezone(local_timezone) + pic_aware_time = pic_naive_time.localize(local_timezone) return pic_aware_time class Match: diff --git a/rad_tag.py b/rad_tag.py index 8013452..148278c 100755 --- a/rad_tag.py +++ b/rad_tag.py @@ -112,7 +112,7 @@ if args.gpx: for track in gpx_reader.tracks: for segment in track.segments: for point in segment.points: - point_aware_time = point.time.astimezone(local_timezone) + point_aware_time = point.time.localize(local_timezone) position = ( point_aware_time, point.latitude,