time zone specifier

Code tips and tricks for beginners
Post Reply
Stuart
Posts: 126
Joined: Fri Feb 19, 2021 7:46 pm
Has thanked: 5 times
Been thanked: 20 times

time zone specifier

Post by Stuart »

My understanding is that if I put GMT0BST,M3.5.0,M10.5.0 in the config file, I will get daylight saving times from time$ during summer time in the UK as specified (M3:March to M10:October). But it doesn't seem to work! Ideas?

Changing GMT0BST to GMT1BST seemed intuitive but didn't do anything.

Stuart
User avatar
cicciocb
Site Admin
Posts: 1889
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 405 times
Been thanked: 1260 times
Contact:

Re: time zone specifier

Post by cicciocb »

The file https://github.com/nayarsystems/posix_t ... /zones.csv
reports GMT0BST,M3.5.0/1,M10.5.0 for London
AndyGadget
Posts: 222
Joined: Mon Feb 15, 2021 1:44 pm
Has thanked: 119 times
Been thanked: 132 times

Re: time zone specifier

Post by AndyGadget »

Try it as this, Stuart.

GMT0BST,M3.5.0/1,M10.5.0

Andy.

(You beat me to it, Francesco :D )
Stuart
Posts: 126
Joined: Fri Feb 19, 2021 7:46 pm
Has thanked: 5 times
Been thanked: 20 times

Re: time zone specifier

Post by Stuart »

Silly me. Saving the config isn't enough, you have to power cycle the chip and restart it. It must only be looked at at power-up. As this particular one is built in to something it doesn't get power cycled normally. For anyone else's benefit, GMT0BST,M3.5.0/1,M10.5.0 does work for UK to get GMT in the winter and BST in the summer from the time$ function.

Thanks guys
User avatar
Fernando Perez
Posts: 378
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 195 times
Been thanked: 266 times

Re: time zone specifier

Post by Fernando Perez »

You don't actually need to reboot the system, just force sync with the NTP server using OPTION.NTPSYNC in the "immediate" window of the editor.
Post Reply