Asterisk func strptime


Returns the epoch of the arbitrary date/time string structured as described in the format.


This is useful for converting a date into an EPOCH time, possibly to pass to an application like SayUnixTime or to calculate the difference between two date strings.


  • *CLI> show function STRPTIME

Return value

Returns the string representing the unix time in seconds since the beginning of the epoch (Jan 1st, 1970)


exten => s,1,Set(foo=${STRPTIME(2006-03-01 07:30:35|America/Chicago|%Y-%m-%d %H:%M:%S)}
should set foo to the value "1141219835"

See also

Created by: murf, Last modification: Wed 29 of May, 2013 (23:46 UTC) by JustRumours
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+