User Tools

Site Tools


time_class

Time class

The time class provides an abstraction on top of PHP date functions, providing easier functions and handling of time zones.

$timestamp = new Timestamp('now');
$timestamp->add(0,0,1);
echo 'In one hour the time is: '.$timestamp->getReadable();

Setting the timezone

Call Timestamp::setDisplayTimeZone($timezone) with a valid PHP timezone identifier to select which timezone should be used when displaying dates and times in the system.

time_class.txt · Last modified: 2020/09/01 13:18 by sahl

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki