I need to upload files from all over the world to the same server. Files become available at the same time every day in the local time zone. The task is to switch to summer time. Since different countries are set up on different days, and some do not perform DST at all, there is an offset between any 2 hour changes during the year. Thus, it is not possible to convert everything into a single time zone. Is there any way to handle this with cron? Or something similar to cron?
I have already tried this and it does not do what I want:
TZ=Asia/Tokyo
05 15 * * * echo $(date) JAPAN >> /tmp/crontest1.txt 2>&1
TZ=Europe/London
05 15 * * * echo $(date) LONDON >> /tmp/crontest2.txt 2>&1
TZ=America/New_York
05 15 * * * echo $(date) NY >> /tmp/crontest3.txt 2>&1
TZ=America/Denver
05 15 * * * echo $(date) DENVER >> /tmp/crontest4.txt 2>&1
everything works at 15:05 in the server time zone, and the output
Fri Mar 24 04:05:01 JST 2017 JAPAN
Thu Mar 23 19:05:01 GMT 2017 LONDON
Thu Mar 23 15:05:01 EDT 2017 NY
Thu Mar 23 13:05:01 MDT 2017 DENVER
therefore, while each process runs with the correct TZ value, it starts during the main server. I need something that sets up a start time for DST.