Time zone/setting time
Chris Hall (132) 3554 posts |
If RISC OS starts up with the RTC set to 01-Jan-2100 and DST automatic (note the RTC always stores date and time in GMT/UTC format) and OS_Word 15,5 is then used to set the GMT date to (say) 5th April 2017 at 10:00 [it does this correctly] and then OS_Word 14,3 followed by OS_ConvertStandardDateAndTime is used to read it back, it reads it as 10:00 rather than the correct local time of 11:00. On next CTRL-Break OS_Word 14,3 followed by OS_ConvertStandardDateAndTime reads it back correctly as 11:00 local time (proving that OS_Word 15,5 had worked correctly). If RISC OS starts up with the RTC set to a Summer time date and you do the same date/time setting, again to a Summer time, then it all works correctly. Can RISC OS handle a change of daylight time status whilst it is switched on? |
Rick Murray (539) 13840 posts |
I baked support for CET and CHEST into my ROM, including altering the Messages so the rule should affect any timezones in UK… And it still didn’t change (machine always on). Go figure. |
Chris Hall (132) 3554 posts |
Using in place of in the following:
seems to overcome this, a subsequent call to OS_Word 14,3 followed by OS_ConvertStandardDateAndTime gives the correct (DST is set to ‘automatic’) 01:00 whether or not the time before setting was Summer or Winter. Using OS_Word 15,5 would only give 01:00 if the time before setting was Summer. Presume OS_Word,15,5 should be deprecated (it is not in the PRMs so few will know about it). |
Jeff Doggett (257) 234 posts |
What call does BASIC use when the TIME$=“<time/date>” statement is used? |
Chris Mahoney (1684) 2165 posts |
When Rick was doing his investigation a couple of years ago I found that the Territory SWIs were much more reliable. I would agree that they should be used when practical (although I’m still grateful to Rick for fixing CLib!)
I tried looking at adding New Zealand DST rules at one point, which ended up looking like more trouble than it was worth. Also, for some bizarre reason there’s a territory number for Maori-speaking NZ but nothing for English-speaking! |
Rick Murray (539) 13840 posts |
Don’t get me started on how utterly broken the Territory system is… |
Ronald May (387) 407 posts |
I tried looking at adding New Zealand DST rules at one point, which ended up looking like more trouble than it was worth. Also, for some bizarre reason there’s a territory number for Maori-speaking NZ but nothing for English-speaking! Probably over a decade ago I realised I was wasting time with the apps, and now just use and set the rtc with the alarm app.The RTC needs adjusting by a few minutes a few times a year anyway. I think the broken stuff should be just removed and why can’t Territory just use ‘configure timezone’ if it sees fit to make a change (when someone changes the territory). Shouldn’t language be treated separately also? eg English person in a different timezone which might have an un-useable language? Magic wand stuff is fine when it works, but when it fails in a few ways (especially System apps) and you are left to put up with it for yonks, It’s a bad look. |
Chris Mahoney (1684) 2165 posts |
Rick just said not to get him started! :P |