Asterisk Time Issues - Time correct on Server but not Inside Asterisk

Hey guys, I’m having issues with the time in Asterisk after a recent reboot…

The time on the server itself is fine…

root@asterisk:~# date
Fri 21 May 2021 02:24:40 PM EDT

But inside Asterisk it’s running UTC —

Asterisk 16.13.0 built by root @ asterisk on a x86_64 running Linux on 2020-09-09 12:44:17 UTC

root@asterisk:~# timedatectl
Local time: Fri 2021-05-21 14:27:24 EDT
Universal time: Fri 2021-05-21 18:27:24 UTC
RTC time: Fri 2021-05-21 18:27:24
Time zone: America/New_York (EDT, -0400)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no

Everything seems right to me bug can’t figure out why Asterisk keeps using UTC… now my time rules for open and close hours aren’t working right…

help ?

That’s the date and time when Asterisk was built. It is always displayed in UTC. Your dialplan issue would be unrelated to that specific line.

Any suggestions as to what may be causing the time difference between the system and Asterisk ?

I don’t have experience with that, I was just clarifying regarding the line you pasted.

It might be a difference between the system and your console session (TZ set in the latter), rather than between Asterisk and the system.


        same = n,                       datetime()
        same = n,                       hangup()

confirm your suspicion?


sudo cat /proc/<asterisk-pid>/environ\
        | tr '\000' '\n'

yield any clues?

On the mailing list, that command shows up as:

sudo cat /proc//environ
> tr ‘%{email_content}00’ ‘\n’


You should access asterisk cli by command : asterisk -r and see whether time have different or not.

If time show in asterisk cli correctly, so you may forgot set timezone when setup timecondition.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.