Hi All,
I am trying to use the Timezone library. I have a list of time zones in a file stored on an SD card on MKRZero. I have the user select the required time zone from a dropdown on the webpage. That all works, and i can retrieve the variables from the entry that are required to generate the TimeChangeRule JSON, but for the life of me I can workout how to create the TimeChangeRule.
I tried passing it the variables as String and as char arrays but it wont accept them.
TimeChangeRule myDST = {tzNameString , tzWOMString , tzDOWString , tzHOURString , tzOffSetString};
TimeChangeRule mySTD = {tzNameString , tzCharWOM , tzCharDOW , tzCharHOUR , tzCharOffSet};
I get "cannot convert 'arduino::String' to 'char' in initialization" when using string and "invalid conversion from 'char*' to 'char' [-fpermissive]" when using char.
I come from an old school code background of VB so String I understand, I am starting to get to grips with char arrays but I am stuck on this and have no idea what the TimeChangeRule is expecting or how to find out.
Has anyone done this and is able to point me in the right direction? The MKRZero has a reasonable amount of program space, so I could use a huge if else block to create them, but I am trying to avoid that so that if the DST values change, I can upload a new TZ file.
Thanks
Ian...