[Freeswitch-users] freeswitch time conversion

Mathieu Rene mrene_lists at avgs.ca
Wed Aug 12 08:04:00 PDT 2009


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_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  

Mathieu Rene
Avant-Garde Solutions Inc
Office: + 1 (514) 664-1044 x100
Cell: +1 (514) 664-1044 x200
mrene at avgs.ca

On 12-Aug-09, at 8:01 AM, Juan Backson wrote:

> 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
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

More information about the FreeSWITCH-users mailing list