Probably fixed tz time offset bug, needs proper testing though.
This commit is contained in:
parent
59a829c428
commit
3642d64505
@ -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:
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user