Posted: Fri Mar 17, 2017 7:09 pm
okay, I see it now at the bottom of the code.
Code: Select all
if ((DST = 1) and (dow = "Sun") and (month = "Nov") and (day >= 1) and (day < 8)) then
DST = 0
if ((DST = 0) and (dow = "Sun") and (month = "Mar") and (day >=8) and (day < 15)) then
DST = 1
I was hoping there was something automatically coming from nist for the next time the goverment decides to change what date DST starts and ends.
Posted: Fri Mar 17, 2017 8:02 pm
Reading up on the problem here https://www.nist.gov/pml/time-and-frequency-division/popular-links/daylight-saving-time-dst
, dst info is available using the Daytime Protocol. I have no idea how difficult it would be to implement such a thing.
Again my apologies for all this whining, I just made the rash assumption that it would all be handled automatically in this day and age.
Posted: Fri Mar 17, 2017 10:21 pm
Not whining (at least I did not see it that way) just trying to understand.
I did not realize that you did not realize that you had to tell the module (or give it the code to test, based on a calendar) when DST was in effect.
I went through this same exercise a few months ago.
I think the reason that NTP servers do not respect the changing of time to DST is that an NTP server is providing time to the whole world (I could be wrong here, I'm just guessing)
But his code to determine when DST is in effect seems to be a good solution.
Posted: Mon Jul 24, 2017 5:09 pm
Code: Select all
; Not the first number -3 is the timezone based off of UTC the second number 0 for dst 1 for no dst
; Below you must include a delay for the time to be setup before you can print or use it IMPORTANT!
;Below is the function to print time
Enjoy hope this helps also if you have any further questions you can refer to documentation or the beginners guide in my signature.