Symisc Systems

Libcox Command Reference


Star Follow @symisc

Command Syntax

strftime format [timestamp = time()]


Alias

None


Description

Format a local time/date (Platform independent implementation). Refer to the date command for the supported format.


Parameters

format

The format of the outputted date string (Refer to the date command).

timestamp

Optional Parameter: The optional timestamp parameter is an integer Unix timestamp that defaults to the current local time if a timestamp is not given. In other words, it defaults to the value of time().


Return Value

String: Returns a string formatted according format using the given timestamp or the current local time if no timestamp is given. Use libcox_value_to_string() to extract the processing result.