Skip to content

Commit a7f5f98

Browse files
committed
Dynamic RECENT_YEARS_START based on current year - 15
While this will probably break CI every start of the year the likely alternative is forgetting about it for years.
1 parent ed1f959 commit a7f5f98

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

tztrout/data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ class TroutData:
166166
# We don't care about the historic data - we just want to know the recent
167167
# state of time zones, zip codes, etc. RECENT_YEARS_START describes how
168168
# far back we should go to check for DST changes, timezone names, etc.
169-
RECENT_YEARS_START = 2010
169+
RECENT_YEARS = 15
170+
RECENT_YEARS_START = datetime.datetime.now().year - RECENT_YEARS
170171

171172
# Sometimes we need to go back a few steps to figure out DSTs, timezone
172173
# names, etc. This is a kwargs dict that is passed to datetime.timedelta

tztrout/data/offset_to_tz_ids.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@
494494
"Asia/Nicosia",
495495
"Asia/Qatar",
496496
"Asia/Riyadh",
497-
"Asia/Tbilisi",
498497
"Europe/Astrakhan",
499498
"Europe/Athens",
500499
"Europe/Bucharest",
@@ -555,7 +554,6 @@
555554
"Asia/Ashgabat",
556555
"Asia/Atyrau",
557556
"Asia/Baku",
558-
"Asia/Bishkek",
559557
"Asia/Dushanbe",
560558
"Asia/Karachi",
561559
"Asia/Oral",

tztrout/data/tz_name_to_tz_ids.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@
507507
"Europe/Kaliningrad",
508508
"Europe/Kyiv",
509509
"Europe/Mariehamn",
510-
"Europe/Minsk",
511510
"Europe/Riga",
512511
"Europe/Simferopol",
513512
"Europe/Sofia",

0 commit comments

Comments
 (0)