NSA325 Losing Time Zone Info

Marvell Kirkwood based
Post Reply
pitcritter
Posts: 103
Joined: Tue Oct 08, 2013 12:51 am

NSA325 Losing Time Zone Info

Post by pitcritter » Mon Sep 05, 2016 12:46 pm

I've been inactive here for quite a while. In this case, no news is good news. My system has been running flawlessly for months :D :D :D

That is...until now.

For the last month or so (I'm honestly not sure of the actual timing), my NSA325 has been losing its time zone information when left to its own devices.

I run the usual setup of SickRage and CouchPotato, but I use NZBGet instead of the more common SAB.

My ISP allows unmetered downloads from 02:00 to 14:00, so time zone actually matters to me.

After a reboot and logged in as ROOT, my system shows the correct reply to the DATE command, showing the correct time EDT.

If I issue the same command in the morning, it's reverted to UTC. The time is still correct but the TZ is wrong.

A further reboot brings everything back to normal.

I started a CRON job to log the time every minute to a log file to see if I could pinpoint if there was a particular time overnight that my system reverted to UTC. The interesting thing is that the output of that file shows EDT for every minute up to the present. To reiterate, DATE at the command line shows (for instance) 13:15 UTC, DATE run through CRON shows 09:15 EDT.

As part of my grasping at straws, I replaced the RTC battery, but, as expected, it made no difference.

Does anyone have any suggestions?

I could simply give in and run my system on UTC and make adjustments to my scheduler within NZBGet, but that seems a little like cheating.

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: NSA325 Losing Time Zone Info

Post by barmalej2 » Tue Sep 06, 2016 6:10 am

If you are running any subsystem like Entware-ng or FFP besides original ZyXel firmware, then you need to set TZ to that subsystem also.

Example for clearance in case of FFP.
There are 2 time zone settings on NSA3**, when FFP is used:
1. One is set by zyxel firmware in NAS administration page for firmware libc using tzdata format.
2. Second needs to be set manually for FFP uClibc using posix time zone format.
For example:
root@NSA310:~# /bin/date
Fri Nov 21 16:46:30 CET 2014
root@NSA310:~# /ffp/bin/date
Fri Nov 21 17:46:31 EET 2014

As you can see, I have set two different time zones:
First is Central European time zone, second East European time zone.
Two different time settings at the same time :)
If program uses firmware provided time zone it's OK, but if it requires correct FFP shell date, which usually differs from firmware, then additional manual configuration is needed.
How to set timezone in ffp: viewtopic.php?f=249&t=16997

pitcritter
Posts: 103
Joined: Tue Oct 08, 2013 12:51 am

Re: NSA325 Losing Time Zone Info

Post by pitcritter » Tue Sep 06, 2016 10:56 am

Thanks for the reply @barmalej2.

True to form, this morning the TZ was still correct.

I see the point about two different TZs, and yes, I do have FFP installed.

I've now added a line to my CRONTab to log /bin/date and /ffp/bin/date to two separate files. I'll check them next time something goes awry (likely tomorrow).

My question is still what would have caused the problem when nothing has changed on my system in months.

I'll post back here when I have some concrete info.

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: NSA325 Losing Time Zone Info

Post by barmalej2 » Tue Sep 06, 2016 1:05 pm

Paste output of:

Code: Select all

ls -la /ffp/start

pitcritter
Posts: 103
Joined: Tue Oct 08, 2013 12:51 am

Re: NSA325 Losing Time Zone Info

Post by pitcritter » Tue Sep 06, 2016 1:13 pm

== Welcome at FFP version 0.7/arm, running on NSA325 NSA325, firmware NSA325_4.71(AAAJ.0) ==
root@NSA325:~# ls -la /ffp/start
total 124
drwxr-xr-x 2 root root 4096 Dec 20 2015 .
drwxr-xr-x 19 root root 4096 Dec 19 2015 ..
-rw-r--r-- 1 root root 0 Jun 10 2014 FETCH_HEAD
-rw-r--r-- 1 root root 52 Jan 13 2012 LOGIN.sh
-rw-r--r-- 1 root root 456 Feb 26 2014 MCServer.sh
-rw-r--r-- 1 root root 35 Jan 13 2012 SERVERS.sh
-rw-r--r-- 1 root root 1924 Jul 11 2014 config.cfg
-rw-r--r-- 1 root root 157 Jan 13 2012 fp_master.sh
-rw-r--r-- 1 root root 203 Jan 21 2012 inetd.sh
-rw-r--r-- 1 root root 906 Dec 12 2012 kickangel.sh
-rw-r--r-- 1 root root 229 Dec 29 2011 kickwebs.sh
-rw-r--r-- 1 root root 286 Dec 12 2012 kickwebs.sh.new
-rw-r--r-- 1 root root 223 Dec 29 2011 lighttpd.sh
-rw-r--r-- 1 root root 1925 Dec 12 2012 lighttpd.sh.new
-rw-r--r-- 1 root root 1625 Dec 28 2011 nfsd.sh
-rwxr-xr-x 1 root root 307 Dec 20 2015 nzbPC.sh
-rw-r--r-- 1 root root 303 Dec 20 2015 nzbPCold.sh
-rwxrwxrwx 1 root root 404 Mar 14 2013 nzbget.sh
-rw-r--r-- 1 root root 9449 Jul 12 2014 nzbstart.sh
-rw-r--r-- 1 root root 160 Dec 30 2011 portmap.sh
-rw-r--r-- 1 root root 1186 Dec 18 2011 rsyncd.sh
-rw-r--r-- 1 root root 1185 Oct 14 2013 rsyncd.sh.new
-rw-r--r-- 1 root root 9374 Jul 11 2014 scriptv0.95.sh
-rwxr-xr-x 1 root root 5665 Feb 24 2015 sickrage.sh
-rwxr-xr-x 1 root root 1094 Dec 29 2011 sshd.sh
-rwxr-xr-x 1 root root 1098 Jun 4 2013 sshd.sh.new
-rw-r--r-- 1 root root 169 Jan 21 2012 telnetd.sh
root@NSA325:~#

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: NSA325 Losing Time Zone Info

Post by barmalej2 » Tue Sep 06, 2016 1:19 pm

Still no clue what can be reason of this.

pitcritter
Posts: 103
Joined: Tue Oct 08, 2013 12:51 am

Re: NSA325 Losing Time Zone Info

Post by pitcritter » Tue Sep 06, 2016 1:24 pm

I appreciate your taking the time to look.

When the problem comes up again, I'll re-post.

I've been considering returning my 325 to full stock, updating the firmware and then starting from scratch with Entware.

Are there pros/cons to that idea?

Post Reply