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

seconds->string converts seconds to string, specified in format.

Parameter Description
sec0 Seconds (Unix epoch) value to be converted
fmt Output string format. Accepting printf % notation and SRFI-19 ~ notation
tz0 Optional: Timezone to be used

Example

Example 1: Get timestamp of now

> (seconds->string (current-time-seconds) "%Y-%m-%d %H:%M:%S")
"2013-08-08 23:22:44"
Clone this wiki locally