Page 1 of 1
Time
Posted: Wed Jan 29, 2014 5:33 pm
by ganjero
is there a code/function to have the controller fetch the time from the internet? I just notice mine controller is an hour ahead, it did not change back in November.
Re: Time
Posted: Wed Jan 29, 2014 5:37 pm
by lnevo
It does not have any daylight savings time or anything. You can change it quickly from phone or portal. Ntp code can be used but it takes a lot of space and don't know many using it. Plus i think it can only query the portal...
Re: Time
Posted: Wed Jan 29, 2014 5:48 pm
by lnevo
Roberto,
Maybe you can throw an aspx on the portal that we can get and write a function to set the time on the RA with an offset for timezone...?
Re: Time
Posted: Wed Jan 29, 2014 5:49 pm
by rimai
I won't work.
Every country has their own rules for DT savings.
Re: Time
Posted: Wed Jan 29, 2014 6:15 pm
by lnevo
So make it return GMT and we can add our own rule for switching DST...or maybe theres an api for timeanddate.com ?
Re: Time
Posted: Wed Jan 29, 2014 6:29 pm
by lnevo
http://www.timeanddate.com/services/api/
Not sure what they charge for an account, but we could write it in a way to avoid querying more than once a day so wouldnt be much traffic.. Either way dont think we'd need the high volume..
This would also give us the option to integrate accurate sunrise/sunset, moonrise/moonset times...
Re: Time
Posted: Wed Jan 29, 2014 6:35 pm
by lnevo
Ok that have small pkgs from $40 a year to $400 for everything...thats for timezone...for astronomy it goes from $50 to $300. It all depends on how many cities to support. I would pay a per month fee to get that support added to my portal options

Re: Time
Posted: Wed Jan 29, 2014 6:51 pm
by rimai
If you have to create your own rules, why not have it directly adjust the clock instead of pulling from the server?
In USA, it is this:
begins at 2:00 a.m. on the second Sunday of March and
ends at 2:00 a.m. on the first Sunday of November
So, you we can just check for the day of the year and set the clock 1 hour ahead and back when it's over.
Re: Time
Posted: Wed Jan 29, 2014 7:43 pm
by lnevo
Good point...but cool to get the astronomic data too
