0

I need to know in advance when a timezone change will occur. I need to know when UK's GMT turns into BST and vice versa.

I don't want to find out what my current timezone is and I don't want to change it.

There must be a way to query the timezone database stored on linux to find out this information.

Thanks Mark

ScaryAardvark
  • 199
  • 1
  • 3
  • 11
  • May I ask why you need this info? Just in case there's another way to solve your problem! – shearn89 Feb 15 '22 at 15:53
  • Yes, we are working with AWS and their scheduler, EventBridge, doesn't handle daylight savings time in their Fargate containers. We therefore have decided to write our own scheduler to start and stop services. Therefore, we need to know when DST will kick in. – ScaryAardvark Feb 16 '22 at 18:14
  • Is there a reason you can't schedule things in UTC? – shearn89 Feb 17 '22 at 08:25
  • Yes, our systems operate on localtime so when DST kicks in they;ll be an our out from starting and stopping – ScaryAardvark Feb 18 '22 at 08:57
  • Ah right. That can get very complicated and messy, but I'm sure you'll find an answer! – shearn89 Feb 18 '22 at 09:12

1 Answers1

1

Install tzdata package.

e.g. if you're using Ubuntu:

sudo apt install tzdata

Having your timezone data updated you can get this data in advance using zdump command:

zdump -v America/New_York
surfingonthenet
  • 695
  • 2
  • 6
  • ok, how am I supposed to use tzdata once I've installed it. running "man tzdata" says no manual entry and there isn't a tzdata executable I can run – ScaryAardvark Feb 16 '22 at 18:15
  • @ScaryAardvark, I don't think need to do anything else. Once it's installed, timezone data is updated. tzdata knows the day daylight saving time beginz and finishes – surfingonthenet Feb 16 '22 at 18:30
  • as I explained, I need to query tz information in advance of the date actually happening. trurns out that zdump can do this. – ScaryAardvark Feb 16 '22 at 18:48
  • Right. zdump does the trick. I updated the post in order to have a more complete answer – surfingonthenet Feb 16 '22 at 20:12