Skip to content

localseconds string

Chris Petersen edited this page Oct 16, 2014 · 1 revision

localseconds->string converts seconds to string, specified in format. Uses UTC, e.g. for relative times.

Parameter Description
sec Seconds (Unix epoch) value to be converted
fmt Output string format. Accepting printf % notation and SRFI-19 ~ notation

Example

Example 1: Get timestamp of now on the UTC clock

> (localseconds->string (current-time-seconds) "%Y-%m-%d %H:%M:%S")
"2013-08-09 06:25:46"
Clone this wiki locally