Iām not right now if that answers your question exactly, but it gives you some tools to help you better understand and verify what is happening.
You can use date and environment-var TZ to help you.
So, for example, I live in Sweden, so my time zone is Europe / Stockholm. So in winter, date +%Z reports CET and in summer CEST. The best part is that you can specify the time zone for the environment of a particular command, then you can specify what date the date command should be present. Therefore, to summarize, you can do any of the following:
TZ=Europe/Stockholm date +%Z
If you need a time difference with UTC, you can use the lowercase z:
TZ=Europe/Stockholm date +%z
NOTE You cannot use TZ=CEST or TZ=ULFR , as this is not a valid TZ:
TZ=CEST date --date=20170101 +%z
Crontab example:
We run our servers in UTC, but some tasks performed by crontab must be performed on a given stand (CET / CEST). Therefore, since we want jobs to be completed one hour in winter (the clock is set one hour ahead, the witch makes it reach a certain UTC time an hour earlier in the summer than in winter), we do sleep before the actual work is done in the winter .
We want the work of /whatever/bin/foobar done at 04:15 times a day. But since cron runs on UTC, work needs to be set up an hour earlier for CET and two hours earlier for CEST. This would be the same as always executing a command two hours before, but sleeping for an hour in the winter. Example crontab line:
15 2 * * * [ `TZ=CET date +\%Z` = CET ] && sleep 3600; /whatever/bin/foobar
If you have a better solution to this problem, please feel free to advise me!