[Freeswitch-dev] Epoch current time difference

Glaucio Vaz de Mello gvmello at yx.cl
Wed Aug 31 17:56:30 MSD 2011


   I noticed a difference between FreeSWITCH time and system clock time.
   Is this a standard behaviour? or something is wrong in my system?

More details of the issue:
   Inside FreeSWITCH I look for current epoch time using this function:
time_t now = switch_epoch_time_now(NULL);

   Then I look for system clock current time using:
#include <time.h>
time_t now = time(NULL);

   Between both results I noticed a difference of 9 seconds.

This can also be viewed using Unix commands.

Unix date command from console:
# date +%s

Then, I start a call and make a DB query:
# sqlite3 /var/freeswitch/db/core.db "SELECT call_created_epoch FROM calls;"

Then I repeat unix date command:
# date +%s

Any comments are welcome.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20110831/3f1e859e/attachment-0001.html 

Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list