Asterisk is taking UTC time for it's logs not systemtime (localtime)

I’m using asterisk version 13.17.2, here asterisk always considers UTC time, even though my system is set local time.
I’ve commented out the ;usegmtime=yes parameter in cdr context, even after this also asterisk uses UTC time for log time, as for /var/log/asterisk/full, Masterisk.csv and other log files.
This is my cdr.conf file cdr context-
;usegmtime=yes ; log date/time in GMT. Default is "no"
loguniqueid=yes ; log uniqueid. Default is "no"
loguserfield=yes ; log user field. Default is "no"
NOTE: I’m compiling this asterisk version with yocto build.

Are you talking about log or about CDRs. I’d always expect logs to be in UTC.

Both logs (full, message, Notice) and CDRs are coming in UTC time, when I’m using same asterisk version in x86_64 system(natively compiled) then asterisk is taking localtime (systemtime), but when I’m compiling same asterisk with yocto BSP (meta-telephony) (compiled with yocto tool-chain), then it is taking UTC time even though system is set to localtime(IST).

hye @david551, please assist me to resolve this issue if you any clue regarding my problem, as it’s becoming road block for my task.

Personally I’d want UTC for all logs, so it isn’t of interest to me to investigate ways of changing that.

However, it looks like logs (VERBOSE, INFORMATION, WARNING, DEBUG, etc.) are output in local time, with no option for anything else, in which case, if you are getting UTC it is because no time zone is set, in the OS, for the asterisk process, or it is set to UTC.

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