webCOMAND

time::get_db_timestamp()

Returns a string representing the current time in YYYY-MM-DD HH:MM:SS format, without microseconds.  Hours are in 24-hour format.  This is the standard timestamp format of most databases and the repository.

Prototype

string static get_db_timestamp()

Example

// output like: Current time: 2018-10-06 22:14:13
$timestamp = \io_comand_util\time::get_db_timestamp();
echo("Current time: $timestamp\n");