What's new

syslog timezone issues

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Chrysalis

Senior Member
So I have an issue in my syslog, snapshot paste below

Code:
Apr  7 21:12:22 rc_service: service 8569:notify_rc restart_syslog
Apr  7 21:12:22 rc_service: WARNING: rc notified of unrecognized event 'syslog'
Apr  7 21:12:34 rc_service: service 8571:notify_rc restart_syslogd
Apr  7 21:12:34 rc_service: WARNING: rc notified of unrecognized event 'syslogd'
Apr  7 21:13:48 syslogd exiting
Apr  7 21:13:53 syslogd started: BusyBox v1.20.2
Apr  7 20:36:14 dnscrypt-proxy[22917]: Refetching server certificates
Apr  7 20:36:14 dnscrypt-proxy[22917]: Server certificate #808464433 received
Apr  7 20:36:14 dnscrypt-proxy[22917]: This certificate looks valid
Apr  7 20:36:14 dnscrypt-proxy[22917]: Chosen certificate #808464433 is valid from [2016-04-08] to [2017-04-08]
Apr  7 20:36:14 dnscrypt-proxy[22917]: Server key fingerprint is BC3C:2154:64F6:927F:0783:55EA:C889:18F3:25FE:29A0:F52E:4D16:080D:671C:B93C:261B
Apr  7 21:47:34 dnsmasq[7296]: time 1832294
Apr  7 21:47:34 dnsmasq[7296]: cache size 10000, 0/5485 cache insertions re-used unexpired cache entries.
Apr  7 21:47:34 dnsmasq[7296]: queries forwarded 2738, queries answered locally 3302
Apr  7 21:47:34 dnsmasq[7296]: server 8.8.4.4#53: queries sent 23, retried or failed 8
Apr  7 21:47:34 dnsmasq[7296]: server 127.0.0.1#65057: queries sent 1757, retried or failed 958
Apr  7 21:47:34 dnsmasq[7296]: server 127.0.0.1#65055: queries sent 958, retried or failed 5
Apr  7 21:53:09 ntp: start NTP update
Apr  7 21:53:10 ntp: NTP update successful after 1 attempt(s)

So can see me trying to restart syslog using init.d commands which failed (but correct timezone), eventually restarted it manually.

all dnscrypt-proxy logging is 1 hour behind. Even when the processes are restarted. Any idea how to fix?

dnsmasq, ntp, syslog, rc_service all correct time.
 
The uclibc timezone database is quite updated, and updating these would be difficult unfortunately. I recommend manually setting start/end of DST under Administration -> System to correct the timezone.
 
A total guess here....I'm not sure that the code sets or correctly sets the TZ environment var, and maybe somehow dnscrypt is depending on that. If it wasn't preset, it may be defaulting to GMT, which I think might account for the 1 hour difference based on your location? You might try setting and exporting TZ to see if it helps. If it works, you could try adding it to init-start.
 
Have you rebooted the router (rather than just services) since the change to BST a couple of weeks ago?
 
A total guess here....I'm not sure that the code sets or correctly sets the TZ environment var, and maybe somehow dnscrypt is depending on that. If it wasn't preset, it may be defaulting to GMT, which I think might account for the 1 hour difference based on your location? You might try setting and exporting TZ to see if it helps. If it works, you could try adding it to init-start.

you know the specific commands for that?
 
whats your day light saving set to ?
Is set to manual
DST start time M3 4 0 2
DST end time M10 4 0 2
London set as region.

I think I am leaning towards what john, said, as I see no evidence of a wrong system timezone, the correct time shows on pages where live timing is shown and all non dnscrypt logging shows correct time. So it seems dnscrypt is failing to detect the proper time zone. GMT instead of BST.
 
The uclibc timezone database is quite updated, and updating these would be difficult unfortunately. I recommend manually setting start/end of DST under Administration -> System to correct the timezone.
yep is manual, see above reply.
 
Since everything else appears to be working correctly, trying adding this after the shebang in the script you are using to start dnscrypt (I did check, and TZ is not being set...but this is still just a guess :) )

export TZ=$(cat /etc/TZ)

has done the trick thanks.

So guess I now need to decide if either I add this to each dnscrypt-proxy script or set it globally.
 
has done the trick thanks.

So guess I now need to decide if either I add this to each dnscrypt-proxy script or set it globally.
Right now, I think you are going to have to add it to every script. I took a look at the code, and it IS being set at the root level....the problem is that it's not being set in the busybox sh shell. I *think* I figured out how to add it.....let me experiment a bit.
 
Right now, I think you are going to have to add it to every script. I took a look at the code, and it IS being set at the root level....the problem is that it's not being set in the busybox sh shell. I *think* I figured out how to add it.....let me experiment a bit.

I added the "export TZ=$(cat /etc/TZ)" to "/opt/etc/profile". Seems to have done the trick.
 
I added the "export TZ=$(cat /etc/TZ)" to "/opt/etc/profile". Seems to have done the trick.
Just to follow up with another method.....to have it automatically done, create a new file
/jffs/configs/profile.add
with the export TZ command. (Seems like Merlin built in the capability :) )
 
Just to follow up with another method.....to have it automatically done, create a new file
/jffs/configs/profile.add
with the export TZ command. (Seems like Merlin built in the capability :) )
hes clever like that :)
 
You should use EST5DST.
 
Is there a way to manually set the timezone setting to the last sunday of a month? Or just have a timezone library set up that has the correct dates set for europe for the next 10 years or so? The UI only offers counting of weekdays from the beginning of a month, which does not fit the rule in place for DST in europe.
Any help would be appreciated!
Oh and feel free to tell me if I should post this in a separate thread, I just felt like it would fit here.
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top