Time

Do you have a question on how to do something.
Ask in here.
Post Reply
ganjero
Posts: 147
Joined: Fri Jul 05, 2013 5:29 am

Time

Post 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.
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Time

Post 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...
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Time

Post 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...?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Time

Post by rimai »

I won't work.
Every country has their own rules for DT savings.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Time

Post 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 ?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Time

Post 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...
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Time

Post 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 :)
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Time

Post 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.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Time

Post by lnevo »

Good point...but cool to get the astronomic data too :)
Post Reply