VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
juanbackson at gmail.com Guest
|
Posted: Wed Aug 12, 2009 7:07 am Post subject: [Freeswitch-users] freeswitch time conversion |
|
|
Does anyone know how to take the epoch time in switch_event_t and convert it into a format such as "Sat Jul 5 02:44:33 2009"?
Is there any existing facility that I can use for this purpose?
br,
JB |
|
Back to top |
|
|
mrene_lists at avgs.ca Guest
|
Posted: Wed Aug 12, 2009 10:11 am Post subject: [Freeswitch-users] freeswitch time conversion |
|
|
Hi,
The standard C function is strftime.
FreeSWITCH has some wrapped ones:
switch_apr.h:SWITCH_DECLARE(switch_status_t) switch_strftime(char *s,
switch_size_t *retsize, switch_size_t max, const char *format,
switch_time_exp_t *tm);
switch_apr.h:SWITCH_DECLARE(switch_status_t)
switch_strftime_nocheck(char *s, switch_size_t *retsize, switch_size_t
max, const char *format, switch_time_exp_t *tm);
switch_core.h:SWITCH_DECLARE(switch_status_t) switch_strftime_tz(const
char *tz, const char *format, char *date, size_t len, switch_time_t
thetime);
Mathieu Rene
Avant-Garde Solutions Inc
Office: + 1 (514) 664-1044 x100
Cell: +1 (514) 664-1044 x200
mrene@avgs.ca
On 12-Aug-09, at 8:01 AM, Juan Backson wrote:
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|