Bug 9818 - Real Time clock not set after clock change on server
: Real Time clock not set after clock change on server
Status: CLOSED FIXED
Product: SB Boom
Classification: Unclassified
Component: Hardware
: unspecified
: PC Linux (other)
: P3 normal (vote)
: 7.3
Assigned To: Max Spicer
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-26 22:47 UTC by Lukas Frey
Modified: 2008-12-15 12:08 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments
Set RTC clock when time changes are detected (409 bytes, patch)
2008-10-27 15:25 UTC, Max Spicer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Frey 2008-10-26 22:47:26 UTC
One for Felix...

The Boom internal RTC is not re-set after the clock on the squeezecenter server is set.

It happend that my Boom alarm (set to 6:15 AM) went of at 5:15 AM because we had the time change from daylight saving time to "normal" time.

Boom alarmed at 5:15 AM. I turned it off, and then, it alarmed again at 6:15 AM.

BTW, my server did the time change automatically, and the time displayed was correct (as it comes from the server).


Regards,
Lukas
Comment 1 James Richardson 2008-10-27 10:16:55 UTC
I didn't see this issue last week when I tested 7.2.1 for alarm time change.  What version of SC are you running?
Comment 2 Felix Mueller 2008-10-27 10:40:51 UTC
James: I think the issue isn't the alarm time changing but the actual time changing due to daylight savings time change. Boom's RTC doesn't know about daylight savings time therefore if the time of the server changes SC would need to reset the RTC in Boom.

I think, Max would know best on how to solve that.
Comment 3 Max Spicer 2008-10-27 15:25:03 UTC
Created attachment 4177 [details]
Set RTC clock when time changes are detected

There doesn't seem to be anything in the original comment to suggest that this was actually to do with the RTC.  I suspect the Boom was connected to the server the whole time.  The RTC would only come in to play if the connection to the server was lost.  The described behaviour simply looks as if the alarm wasn't rescheduled when the DST adjustment occurred.  This is what would happen with any version before 7.2.1.  With 7.2.1 and beyond, the alarm code will notice a change in system time, or if DST comes into/out of effect and will reschedule alarms accordingly.

All that said, it probably still is the case that RTC clock is not being updated after a system time change.  The alarm code currently updates the RTC alarm when it notices a time change, but does not call setRTCTime.  I've just looked through the code to see how the RTC clock gets set, and it appears to only be on a client reconnect.  The following patch is probably therefore the way forward, but I've had no time to test it.  If someone else could check this out and commit it, that would be great - I'm too busy at the moment.
Comment 4 Max Spicer 2008-10-28 07:05:39 UTC
Comment on attachment 4177 [details]
Set RTC clock when time changes are detected

Scratch that.  The RTC time needs to be kept in rough sync with the server time irrespective of whether alarms are scheduled or not.  After chatting with Felix, I think this is best done outside of the alarm code as it's not really alarm functionality (although the alarm needs it) and there's no existing place in the alarm code where it would make sense to add it.
Comment 5 Andy Grundman 2008-10-29 10:58:49 UTC
Fixed in change 23732.
Comment 6 James Richardson 2008-12-15 12:08:44 UTC
This bug has been fixed in the 7.3.0 release version of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.