How to sync Asterisk CDRs time with system time instead of hardware clock


I want to sync Asterisk CDR timing with system (local) time instead of hardware clock (hwclock). Because I can not access hwclock in my VM in Citrix, so hwclock time can not be changed.

No need to do anything. Asterisk will take the time from the OS, like any other well behaved application, not from the hardware clock.

I’m not sure what your real problem is, but I rather suspect it is an OS related issue, not an Asterisk one.

I would add that time keeping in guest systems is a complex issue, as VM hosts often warp real time, and that, and scheduling jitter, means you may not get good results from running synchronisation software, like ntpd, in the guest. Generally guest time synchronisation needs to be addressed in the host, or as a combination of host and VM support software in the guest.

Also, it is inadvisable to run hard realtime software in a VM for which you do not have complete control of the host.