What's new

That time of year again....DST

  • 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!

nvram set time_zone_x=GMT0DST,M3.5.0/1,M10.5.0/2 doesn't look to have stuck for some reason. I've just checked mine and it's still correct after my nvram commit from yesterday
Using quotes
Code:
nvram set time_zone_x="GMT0DST,M3.5.0/1,M10.5.0/2"
as suggested by @ColinTaylor worked in changing the system time.
Code:
admin@RT-AX88U-5050:/tmp/home/root# echo "GMT0DST,M3.5.0/1,M10.5.0/2" > /etc/TZ
admin@RT-AX88U-5050:/tmp/home/root# nvram set time_zone_x="GMT0DST,M3.5.0/1,M10.5.0/2"
admin@RT-AX88U-5050:/tmp/home/root# nvram commit
admin@RT-AX88U-5050:/tmp/home/root# date
Mon Mar 15 17:58:16 GMT 2021

However nvram commit is not taking
Code:
nvram getall 2> /dev/null | grep time_zone
time_zone=GMT0DST_1
time_zone_dst=1
time_zone_dstoff=M3.5.0/1,M10.5.0/2
time_zone_x=GMT0DST,M3.5.0/1,M10.5.0/2

And syslog times (using scribe) are all over the place
Code:
Mar 15 17:51:30 RT-AX88U-5050 scMerlin: Mounting scMerlin WebUI page as user3.asp
Mar 15 17:51:31 RT-AX88U-5050 openvpn: Forcing 10.xx.xx.150 to use DNS server 103.xx.xx.100
Mar 15 18:51:31 RT-AX88U-5050 avahi-daemon[10697]: Server startup complete. Host name is RT-AX88U-5050.local. Local service cookie is 2928078056.
Mar 15 18:51:31 RT-AX88U-5050 avahi-daemon[10697]: Alias name "RT-AX88U" successfully established.
Mar 15 18:51:32 RT-AX88U-5050 cfg_server:
event: wl_chanspec_changed_action
Mar 15 18:51:32 RT-AX88U-5050 avahi-daemon[10697]: Service "RT-AX88U-5050" (/tmp/avahi/services/alexa.service) successfully established.
Mar 15 18:51:33 RT-AX88U-5050 kernel: ip_set: protocol 6
Mar 15 18:51:33 RT-AX88U-5050 kernel: cfg80211: Calling CRDA to update world regulatory domain
Mar 15 18:51:33 RT-AX88U-5050 dhcp6_client: bound prefix xxxx:xxxx:dd21:6e00::/56
Mar 15 18:51:36 RT-AX88U-5050 kernel: cfg80211: Calling CRDA to update world regulatory domain
Mar 15 17:51:38 RT-AX88U-5050 ntpMerlin: Mounted ntpMerlin WebUI page as user4.asp
Mar 15 18:51:39 RT-AX88U-5050 dropbear[11906]: Child connection from 10.xx.xx.115:54291
Mar 15 18:51:40 RT-AX88U-5050 kernel: cfg80211: Exceeded CRDA call max attempts. Not calling CRDA
Mar 15 18:51:44 RT-AX88U-5050 dropbear[11906]: Password auth succeeded for 'admin' from 10.xx.xx.115:54291
Mar 15 18:52:06 RT-AX88U-5050 crond[1196]: time disparity of 1505566 minutes detected
Mar 15 18:52:34 RT-AX88U-5050 kernel: bcm_i2c: bus 0: Failed to detect SFP: 100 retries exhausted
and ntpMerlin was still reporting 'DST is currently active' until I set nvram set time_zone_dst=0.
 
Using quotes
Code:
nvram set time_zone_x="GMT0DST,M3.5.0/1,M10.5.0/2"
as suggested by @ColinTaylor worked in changing the system time.
Code:
admin@RT-AX88U-5050:/tmp/home/root# echo "GMT0DST,M3.5.0/1,M10.5.0/2" > /etc/TZ
admin@RT-AX88U-5050:/tmp/home/root# nvram set time_zone_x="GMT0DST,M3.5.0/1,M10.5.0/2"
admin@RT-AX88U-5050:/tmp/home/root# nvram commit
admin@RT-AX88U-5050:/tmp/home/root# date
Mon Mar 15 17:58:16 GMT 2021

However nvram commit is not taking
Code:
nvram getall 2> /dev/null | grep time_zone
time_zone=GMT0DST_1
time_zone_dst=1
time_zone_dstoff=M3.5.0/1,M10.5.0/2
time_zone_x=GMT0DST,M3.5.0/1,M10.5.0/2

And syslog times (using scribe) are all over the place
Code:
Mar 15 17:51:30 RT-AX88U-5050 scMerlin: Mounting scMerlin WebUI page as user3.asp
Mar 15 17:51:31 RT-AX88U-5050 openvpn: Forcing 10.xx.xx.150 to use DNS server 103.xx.xx.100
Mar 15 18:51:31 RT-AX88U-5050 avahi-daemon[10697]: Server startup complete. Host name is RT-AX88U-5050.local. Local service cookie is 2928078056.
Mar 15 18:51:31 RT-AX88U-5050 avahi-daemon[10697]: Alias name "RT-AX88U" successfully established.
Mar 15 18:51:32 RT-AX88U-5050 cfg_server:
event: wl_chanspec_changed_action
Mar 15 18:51:32 RT-AX88U-5050 avahi-daemon[10697]: Service "RT-AX88U-5050" (/tmp/avahi/services/alexa.service) successfully established.
Mar 15 18:51:33 RT-AX88U-5050 kernel: ip_set: protocol 6
Mar 15 18:51:33 RT-AX88U-5050 kernel: cfg80211: Calling CRDA to update world regulatory domain
Mar 15 18:51:33 RT-AX88U-5050 dhcp6_client: bound prefix xxxx:xxxx:dd21:6e00::/56
Mar 15 18:51:36 RT-AX88U-5050 kernel: cfg80211: Calling CRDA to update world regulatory domain
Mar 15 17:51:38 RT-AX88U-5050 ntpMerlin: Mounted ntpMerlin WebUI page as user4.asp
Mar 15 18:51:39 RT-AX88U-5050 dropbear[11906]: Child connection from 10.xx.xx.115:54291
Mar 15 18:51:40 RT-AX88U-5050 kernel: cfg80211: Exceeded CRDA call max attempts. Not calling CRDA
Mar 15 18:51:44 RT-AX88U-5050 dropbear[11906]: Password auth succeeded for 'admin' from 10.xx.xx.115:54291
Mar 15 18:52:06 RT-AX88U-5050 crond[1196]: time disparity of 1505566 minutes detected
Mar 15 18:52:34 RT-AX88U-5050 kernel: bcm_i2c: bus 0: Failed to detect SFP: 100 retries exhausted
and ntpMerlin was still reporting 'DST is currently active' until I set nvram set time_zone_dst=0.
if /etc/TZ is correct, then logging should be ok. you can see ntpmerlin uses the correct time as it reads from this. I've just fixed up scribe (I think) by:
  • Uncommenting
    Code:
    keep_timestamp(yes)
    in
    Code:
    /opt/etc/syslog-ng.conf
    and changing to
    Code:
    keep_timestamp(no)
  • adding
    Code:
    TZ=$(cat /etc/TZ)
    export TZ
    below
    Code:
    #!/bin/sh
    in
    Code:
    /opt/etc/init.d/S01syslog-ng
  • running
    Code:
    /opt/etc/init.d/S01syslog-ng restart
 
However nvram commit is not taking
Code:
nvram getall 2> /dev/null | grep time_zone
time_zone=GMT0DST_1
time_zone_dst=1
time_zone_dstoff=M3.5.0/1,M10.5.0/2
time_zone_x=GMT0DST,M3.5.0/1,M10.5.0/2
What do you mean by "nvram commit is not taking"? It looks OK to me.
 
What do you mean by "nvram commit is not taking"? It looks OK to me.
Maybe, as in my case, as soon as I disallow SSH and press apply (it is in the same system page as time settings) time comes back to the wrong settings (hitting "apply" in system page applies ALL configurations in that page).
 
Maybe, as in my case, as soon as I disallow SSH and press apply (it is in the same system page as time settings) time comes back to the wrong settings (hitting "apply" in system page applies ALL configurations in that page).
Exactly, that's expected. By pressing apply you're overwriting the changes you made with the incorrect ones from the GUI. That's why I asked in post #19 "Did you apply any changes through the GUI (Administration - System) after issuing the nvram commands?" :rolleyes:
 
I checked /etc/TZ
Code:
admin@RT-AX88U-5050:/tmp/home/root# cat /etc/TZ
GMT0DST
which seems fine.

When I opened
Code:
/opt/etc/syslog-ng.conf
there was no
Code:
keep_timestamp(yes)
.

I tried adding
Code:
keep_timestamp(no)
in various places and eventually settled on putting it in options (as the last item) as anywhere else the restart failed. I then made the edits to
Code:
/opt/etc/init.d/S01syslog-ng
and restarted as suggested.

However, although syslog-ng is running, the timecodes are still out by an hour.

What do you mean by "nvram commit is not taking"? It looks OK to me.
In the sense that if I reboot the server the time is again set including DST. I have not changed the TimeZone settings in the GUI.
 
I checked /etc/TZ
Code:
admin@RT-AX88U-5050:/tmp/home/root# cat /etc/TZ
GMT0DST
which seems fine.

When I opened
Code:
/opt/etc/syslog-ng.conf
there was no
Code:
keep_timestamp(yes)
.

I tried adding
Code:
keep_timestamp(no)
in various places and eventually settled on putting it in options (as the last item) as anywhere else the restart failed. I then made the edits to
Code:
/opt/etc/init.d/S01syslog-ng
and restarted as suggested.

However, although syslog-ng is running, the timecodes are still out by an hour.


In the sense that if I reboot the server the time is again set including DST. I have not changed the TimeZone settings in the GUI.
/etc/TZ should match time_zone_x

The syslog-ng setting should be near the very top
 
Exactly, that's expected. By pressing apply you're overwriting the changes you made with the incorrect ones from the GUI. That's why I asked in post #19 "Did you apply any changes through the GUI (Administration - System) after issuing the nvram commands?" :rolleyes:
You are right. Then, the problem is that you cannot apply any change in System page after the nvram commit, e.g. disable SSH ...
 
/etc/TZ should match time_zone_x

The syslog-ng setting should be near the very top
I assume this is okay
Code:
admin@RT-AX88U-5050:/tmp/home/root# cat /etc/TZ
GMT0DST
admin@RT-AX88U-5050:/tmp/home/root# nvram get time_zone_x
GMT0DST,M3.5.0/1,M10.5.0/2

I have attached the whole syslog-ng.conf, including my edit
Code:
#############################################################################
# syslog-ng.conf customized for scribe on Asuswrt-Merlin firmware
# compare to /opt/share/syslog-ng/examples/syslog-ng.conf-opkg for differences from Entware distribution
#
# syslog-ng documentation: https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.29/administration-guide
#
# Release notes: https://github.com/syslog-ng/syslog-ng/releases

@version: 3.29
#@include "scl.conf" # uncomment this line to for additional functionality, see syslog-ng documentation
@include "/opt/etc/syslog-ng.d/" # Put any customization files in this directory

options {
    chain_hostnames(no); # Enable or disable the chained hostname format.
    create_dirs(yes);
    keep_hostname(yes); # Enable or disable hostname rewriting.
    log_fifo_size(256); # The number of messages that the output queue can store.
    log_msg_size(16384); # Maximum length of a message in bytes.
    stats_freq(21600); # The period between two STATS messages sent by syslog-ng, containing statistics about dropped logs in seconds; 0 disables. (21,600 seconds = 6 hours)
    flush_lines(0); # How many lines are flushed to a destination at a time.
    use_fqdn(no); # Add Fully Qualified Domain Name instead of short hostname.
    keep_timestamp(no);  JUST ADDED
};



# syslog-ng gets messages from the system, kernel, and syslog-ng (internal)
# DO NOT use system() source; causes issues on HND routers
# so_rcvbuf = maximum number of messages per second * 1024
source src {
    unix-dgram("/dev/log" so_rcvbuf(65536) flags(syslog-protocol));
    file("/proc/kmsg" program_override("kernel") flags(kernel));
    internal();
#    udp(ip(192.168.x.y) port(514)); # uncomment this line to pass all network messages through syslog-ng filters
};

# if you only want to pass network messages through some syslog-ng filters, uncomment the source line below
# then add "soource(net);" to the log statement in any filter you want to pass network messages through
#source net { udp(ip(192.168.x.y) port(514)); };

# set the filename for the default log file - anything not filtered out will end up here
destination messages { file("/opt/var/log/messages"); };

# to send log messages to the local network, uncomment the destination line below
# then add "destination(log_server);" to the log statement in any filter you want to pass network messages through
#destination log_server { udp("192.168.x.y" port(514)); };

log {
    source(src);
#    source(net); # uncomment this and "source net" function above to get udp log messages from local network
    destination(messages);
#    destination(log_server); # uncomment this and "destination log_server" function above to send udp log messages to local network
};

But I cannot see keep_timestamp(yes).
 
I have attached the whole syslog-ng.conf, including my edit
Code:
#############################################################################
# syslog-ng.conf customized for scribe on Asuswrt-Merlin firmware
# compare to /opt/share/syslog-ng/examples/syslog-ng.conf-opkg for differences from Entware distribution
#
# syslog-ng documentation: https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.29/administration-guide
#
# Release notes: https://github.com/syslog-ng/syslog-ng/releases

@version: 3.29
#@include "scl.conf" # uncomment this line to for additional functionality, see syslog-ng documentation
@include "/opt/etc/syslog-ng.d/" # Put any customization files in this directory

options {
    chain_hostnames(no); # Enable or disable the chained hostname format.
    create_dirs(yes);
    keep_hostname(yes); # Enable or disable hostname rewriting.
    log_fifo_size(256); # The number of messages that the output queue can store.
    log_msg_size(16384); # Maximum length of a message in bytes.
    stats_freq(21600); # The period between two STATS messages sent by syslog-ng, containing statistics about dropped logs in seconds; 0 disables. (21,600 seconds = 6 hours)
    flush_lines(0); # How many lines are flushed to a destination at a time.
    use_fqdn(no); # Add Fully Qualified Domain Name instead of short hostname.
    keep_timestamp(no);  JUST ADDED
};



# syslog-ng gets messages from the system, kernel, and syslog-ng (internal)
# DO NOT use system() source; causes issues on HND routers
# so_rcvbuf = maximum number of messages per second * 1024
source src {
    unix-dgram("/dev/log" so_rcvbuf(65536) flags(syslog-protocol));
    file("/proc/kmsg" program_override("kernel") flags(kernel));
    internal();
#    udp(ip(192.168.x.y) port(514)); # uncomment this line to pass all network messages through syslog-ng filters
};

# if you only want to pass network messages through some syslog-ng filters, uncomment the source line below
# then add "soource(net);" to the log statement in any filter you want to pass network messages through
#source net { udp(ip(192.168.x.y) port(514)); };

# set the filename for the default log file - anything not filtered out will end up here
destination messages { file("/opt/var/log/messages"); };

# to send log messages to the local network, uncomment the destination line below
# then add "destination(log_server);" to the log statement in any filter you want to pass network messages through
#destination log_server { udp("192.168.x.y" port(514)); };

log {
    source(src);
#    source(net); # uncomment this and "source net" function above to get udp log messages from local network
    destination(messages);
#    destination(log_server); # uncomment this and "destination log_server" function above to send udp log messages to local network
};

But I cannot see keep_timestamp(yes).
that's weird, but the options section is correct. did you add the lines I indicated to /opt/etc/init.d/S01syslog-ng as well?

your /etc/TZ doesn't match, the below works for me:
Code:
admin@RT-AC86U:/tmp/home/root# nvram get time_zone_x
GMT0DST,M3.5.0/1,M10.5.0/2
admin@RT-AC86U:/tmp/home/root# cat /etc/TZ
GMT0DST,M3.5.0/1,M10.5.0/2
 
redid echo "GMT0DST,M3.5.0/1,M10.5.0/2" > /etc/TZ - and scribe is now showing the expected times. :D

Once we get to the end of the month do I need to remove these edits, or will they be fine left in place?

Thank you for all your help.
 
redid echo "GMT0DST,M3.5.0/1,M10.5.0/2" > /etc/TZ - and scribe is now showing the expected times. :D

Once we get to the end of the month do I need to remove these edits, or will they be fine left in place?

Thank you for all your help.
no idea to be honest!
 

Latest 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