Ensure that end hours are at least the same as current

main
Bob Mottram 2022-08-23 12:40:51 +01:00
parent f9739c4774
commit e2db921c87
1 changed files with 3 additions and 2 deletions

View File

@ -589,8 +589,9 @@ def _hashtag_map_within_hours(base_dir: str, tag_name: str,
secs_since_epoch = \
int((datetime.datetime.utcnow() -
datetime.datetime(1970, 1, 1)).total_seconds())
end_hours_since_epoch = int(secs_since_epoch / (60 * 60))
start_hours_since_epoch = end_hours_since_epoch - abs(hours)
curr_hours_since_epoch = int(secs_since_epoch / (60 * 60))
start_hours_since_epoch = curr_hours_since_epoch - abs(hours)
end_hours_since_epoch = curr_hours_since_epoch + 2
if map_format == 'gpx':
map_str = \
_hashtag_map_to_gpx(base_dir, tag_name,