Jack
With over 85 timezone rules around the world, because of this there is just not enough memory to enter them all in arduino.
i am trying to make a web changeable clock where you would enter your timezone and your country rules like:
-7,1,2,1,3,2,1,1,11,2
-7,0 if no DST called for
TZ, DST, SpringWK, SpringDOW, SpringMonth, SpringHR, FallWK, FallDOW FallMonth, FallHR
if DST = 0 both change rules offset would be set equal like the Arizona rule
Stored in JSON and parsed, calculated and passed as variables into 1 rule.
TimeChangeRule DT = { "DT" , DTwk, DTdow, DTmonth, DThr, GMT_DST }; //UTC +- X-60 minutes
TimeChangeRule ST = { "ST" , STwk, STdow, STmonth, SThr, GMToffset }; //UTC +- X minutes
Timezone DST( myDT, myST );
i can write to the struct with DT.offset = GMToffset; etc... just fine.
the JSON, parsing, calculating and web already work.
my issue is how to "REBUILD" the Timezone object after writing to the struct.
ie; Timezone DST( DT, ST );
test code shows the struct changes but the time stays the same as GMT ( I'm using NTP)
a fixed rule works but not a calculated rule even though the numbers are the same when printed.
TimeChangeRule usMDT = {"MDT", Second, dowSunday, Mar, 2, -360};
TimeChangeRule usMST = {"MST", First, dowSunday, Nov, 2, -420};
if i declare the object in setup() its not global and loop() cant see it.
How can i access the "Timezone object" directly?