NethVoice Asterisk time and system time not equal (2 hours off)

Hi,

While testing time conditions in a dialplan, it noticed that Asterisk is using a different time than the system tme of the host/node.

On the console of the node, the command ‘date’ shows 15:00hrs, and asterisk command ‘core show settings’ the time shown (last reload) is 13:00hrs. So the time condition in the dialplan will always fail. By default Asterisk TZ is set to Rome and I hav changed that several times to other central European cities, just to check. No change, same iss of 2 hours off.

Any pointers please on:

  1. How to set the system time on a node from the NS8 GUI just like in NS7
  2. How to troubleshoot the above issue

TIA

Which is your timezone?
Rome should be CET (which currently should be +1 for timezone and +1 for DST compared to UTC)

Rome , Brussels, Antwerp, Paris, Amsterdam

So my server’s date is just fine according to the ‘date’ command. Just asterisk ‘thinks’ it is 2 hours earlier than the system time. I can not reproduce the time that Aterisk is using with any other tools/command.

TIA

ps:
ref Asterisk Time Issues - Time correct on Server but not Inside Asterisk - Asterisk Support - Asterisk Community

My systems output:

[root@srv1 ~]# timedatectl
               Local time: Wed 2024-08-28 15:26:42 CEST
           Universal time: Wed 2024-08-28 13:26:42 UTC
                 RTC time: Wed 2024-08-28 15:26:42
                Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: yes

Warning: The system is configured to read the RTC time in the local time zone.
         This mode cannot be fully supported. It will create various problems
         with time zone changes and daylight saving time adjustments. The RTC
         time is never updated, it relies on external facilities to maintain it.
         If at all possible, use RTC in UTC by calling
         'timedatectl set-local-rtc 0'.
[root@srv1 ~]# 

The Asterisk speaking clock (*60) indeed says the UTC time and not the system time

@giacomo does this issue ring a bell with you pls?

Got it…

Despite having set the correct system time and timezone, for each and every timezone condition the timezone has to be specifically set to you TZ. Then the time conditon works as expected.

When creating a time condition in Visualplan setting the timezone is not possible, so first create the time condition in VisualPan and save, then go to NethVoice → Admin → Advanced → Applications → Time Conditions and edit your time condition. Now one can set the correct Time Zone and save. OR click the advanced section of the time condition in VisualPlan.

One more note, whilst VisualPlan will let you name a time condition as e.g. “my_time_condition”, in the advanced editing mode, such a name with underscore is not accepted. Rename to something and save. Edit again and the old name pops back and the correct TZ is still there…

Who needs a wiki anyways.

HTH

@pike thanks for pointing me in the right direction.

You have to thank yourself, I simply pointed out an obvious thing for me that I started tinkering on DOS and I was always asking myself “why my dual boot PC keep having hour wrong…” :wink:

1 Like