Time Zone not following system time [SOLVED]

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
doomedtx
Newbie
Newbie
Posts: 7
Joined: April 15th, 2014, 12:56 pm

Time Zone not following system time [SOLVED]

Post by doomedtx »

Hello, I've noticed some odd things recently with 2.2.1 [bcc4dd7] on Windows 10. I travel around a lot for my job and was just in Osaka (UTC+9) a few days ago. I've been back in US Central Time (UTC-5) for a few days, and my Windows 10 system time shows the correct time. When I added a release from Radarr, the SABnzbd time was at UTC+9, the file started downloading right away (scheduled to start tonight at 2300), and a warning I received was "WARNING (in 14 hours): too many connections to...."

Here is a snippet from the log file:

Code: Select all

2017-09-07 02:53:18,358::INFO::[urlgrabber:72] URLGrabber starting up
2017-09-07 02:53:30,619::INFO::[interface:553] Successful login from 127.0.0.1
2017-09-07 07:00:00,000::INFO::[downloader:277] Pausing
2017-09-09 01:17:14,450::INFO::[SABnzbd:1147] --------------------------------
2017-09-09 01:17:14,450::INFO::[SABnzbd:1148] SABnzbd.exe-2.2.1 (rev=bcc4dd75cfeab41a4b56308709c04fd568859d1f)
After being shutdown for more than 24 hours as I traveled back to the US,SABnzbd started up on 2017-09-08 at 11:17 UTC-5. The log shows SABnzbd has the time set at UTC+9

When I noticed the error, I restarted SABnzbd, at which time it went back to the correct time zone:

Code: Select all

2017-09-10 09:21:18,482::INFO::[_cplogging:219] [10/Sep/2017:09:21:18] ENGINE Bus STOPPING
2017-09-10 09:21:26,450::INFO::[_cplogging:219] [10/Sep/2017:09:21:26] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('127.0.0.1', 8080)) shut down
2017-09-10 09:21:26,450::INFO::[_cplogging:219] [10/Sep/2017:09:21:26] ENGINE Stopped thread '_TimeoutMonitor'.
2017-09-10 09:21:26,450::INFO::[_cplogging:219] [10/Sep/2017:09:21:26] ENGINE Bus STOPPED
2017-09-10 09:21:26,450::INFO::[_cplogging:219] [10/Sep/2017:09:21:26] ENGINE Bus EXITING
2017-09-10 09:21:26,450::INFO::[_cplogging:219] [10/Sep/2017:09:21:26] ENGINE Bus EXITED
2017-09-10 09:21:26,450::INFO::[_cplogging:219] [10/Sep/2017:09:21:26] ENGINE Re-spawning C:\Program Files\SABnzbd\SABnzbd.exe C:\Program Files\SABnzbd\SABnzbd.exe -p
2017-09-09 19:21:27,467::INFO::[SABnzbd:1147] --------------------------------
2017-09-09 19:21:27,467::INFO::[SABnzbd:1148] SABnzbd.exe-2.2.1 (rev=bcc4dd75cfeab41a4b56308709c04fd568859d1f)
During this whole time, the Windows system time was correctly on UTC-5. In fact, the warning shows that somehow there are two time zone settings at play in SABnzbd:

Code: Select all

2017-09-10 09:18:13,539::WARNING::[downloader:636] Too many connections to server xxxxxx
The log shows it still thought it was in Japan UTC+9, but the GUI showed "WARNING (in 14 hours)" as I stated above. I didn't think to capture a screen shot, but it definitely showed the warning was in 14 hours. That means it was comparing the time of the warning to the system time and calculating that it was occurring 14 hours in the future.

I hope this is enough to accurately describe the issue. I searched through the forum and saw several replies indicating SABnzbd simply uses the system time. I think I saw today that's not what is happening. In case it's relevant, neither my Sonarr nor Radarr logs have any 2017-09-10 entries, meaning they don't seem to be sending the time change to SABnzbd.
Last edited by doomedtx on September 9th, 2017, 8:00 pm, edited 2 times in total.
doomedtx
Newbie
Newbie
Posts: 7
Joined: April 15th, 2014, 12:56 pm

Re: Time Zone not following system time

Post by doomedtx »

OK, I get it now (I think). SABnzbd is starting when Windows starts, and is grabbing the time before the system locates itself and sets the time automatically. It doesn't poll the time again until it's re-started.

So, not a bug, just a consequence of crossing a lot of time zones. That also explains why the downloads were starting at odd times when I was in Osaka. The laptop was in a US time zone when SABnzbd started up, and then Windows fixed its own time while SABnzbd continued in the old time zone. I'll be sure to restart SABnzbd after changing time zones in the future.
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Time Zone not following system time [SOLVED]

Post by safihre »

Working on getting this fixed in 2.3.0 :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply