strftime()
strftime(string, time): String
Formats a Unix timestamp, and returns a string according to given formatting rules.
string |
String |
Formatting string - see this for available options http://www.cplusplus.com/reference/ctime/strftime/ |
time |
Integer |
UNIX time (number of seconds since epoch). |
Return
Formatted time as a string.
println(strftime("%Y-%m-%d %H:%M", time())); //Will print: "2016-01-19 12:14"
println(strftime("%Y-%m-%d %H:%M - timezone %Z - offset from UTC - %z", time())); //Will print: "2016-01-19 12:14 - timezone CET - offset from UTC - +0100"