Bug 15048 - Uninitialized Linux date and time results in incorrect date/time in logs, wrong time displayed on connected players, failure to scrobble etc.
: Uninitialized Linux date and time results in incorrect date/time in logs, wro...
Status: CLOSED FIXED
Product: SB Touch
Classification: Unclassified
Component: Settings
: unspecified
: All Other
: P1 normal (vote)
: 7.5.0
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-04 11:38 UTC by Mickey Gee
Modified: 2010-04-08 17:25 UTC (History)
6 users (show)

See Also:
Category: Bug


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickey Gee 2009-11-04 11:38:51 UTC
Running with firmware 7.5.0 r8005. The date and time stamps in logs is off. For example:

[69-12-31 21:05:13.6842] main::init (341) Starting Squeezebox Server (v7.5.0, r29151, Wed Nov  4 02:14:56 PST 2009) perl 5.010000

I think that's December 31 1969. That was an interesting year, but it's not correct!
Comment 1 Andy Grundman 2009-11-04 11:47:56 UTC
This is normal and should get fixed when you connect to a server.
Comment 2 Chris Owens 2009-11-06 13:17:06 UTC
Mickey is this really happening in a 'normal' use case?
Comment 3 Mickey Gee 2009-11-06 14:08:07 UTC
After playing the logs a little bit, it appears to correct itself. Don't know how or when. Reducing priority given this finding.
Comment 4 Michael Herger 2009-12-04 02:49:15 UTC
This is a P1: several features depend on the clock (screensaver, logging, Last.FM handshake etc.).
Comment 5 Michael Herger 2009-12-04 02:50:16 UTC
re. comment 1: I'm seeing this when connecting to tinysc...
Comment 6 Michael Herger 2009-12-04 10:03:15 UTC
We could TinySC have look the time up on mysb.com. Might need to expose that call to the web UI and make it part of the mysb.com handshaking or something.
Comment 7 Michael Herger 2009-12-04 10:03:41 UTC
s/web UI/web service/
Comment 8 Michael Herger 2009-12-04 14:02:39 UTC
The problem we'd like to solve here is setting the fab4's time when it's connected to itself (tinysc). In the other cases the server will tell fab4 the time.

My suggestion is quite simple: the Slim::Networking::SqueezeNetwork->login() already receives a time stamp from mysb.com in its response (  "time" => "1259963741" ). We can read this value, send it to the "date" listeners, which in turn will set the system's clock. In order to keep the time accurate, S::U::OS::SqueezeOS could trigger that quick request on an hourly basis.

Sounds a bit backwards, but imho the simplest solution with the least code changes required. Most of it is already in place. The remaining changes would only be implemented for SqueezeOS/TinySC, thus safe for the other systems.

All this is assuming there's a good reason we don't use NTP. I don't know the history and backgrounds of this issue...
Comment 9 Alan Young 2009-12-04 23:44:43 UTC
This sounds like a good solution. we should at least try it.

We don't use ntp because the full implementation is too big - but the real issue is what servers to point it at. We do have msntp in the build but are not using it just yet. We could switch it it if we have to but let's see how your suggestion works first.
Comment 10 SVN Bot 2009-12-07 07:15:20 UTC
 == Auto-comment from SVN commit #29555 to the slim repo by michael ==
 == https://svn.slimdevices.com/slim?view=revision&revision=29555 ==

Bug: 15048
Description: if SBS is run on SqueezeOS it doesn't know about the current time. We have to ask mysb.com and let subscribers know about the real time.

There's still a problem with the scanner being triggered when the time is adjusted.
Comment 11 SVN Bot 2009-12-08 03:22:28 UTC
 == Auto-comment from SVN commit #29562 to the slim repo by michael ==
 == https://svn.slimdevices.com/slim?view=revision&revision=29562 ==

Bug: 15048
Description: use cheaper and public /api/v1/time query instead of login request
Comment 12 Chris Owens 2010-04-08 17:25:56 UTC
This bug has been marked fixed in a released version of Squeezebox Server or the accompanying firmware or mysqueezebox.com release.

If you are still seeing this issue, please let us know!