User Tools

Site Tools


timestamp_class

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
timestamp_class [2019/12/11 22:15] sahltimestamp_class [2020/09/01 13:18] (current) – removed sahl
Line 1: Line 1:
-====== Timestamp class ====== 
  
-The timestamp provides an abstraction on top of PHP date functions, providing easier function and handling of time zones. 
- 
-<code php> 
-$timestamp = new Timestamp('now'); 
-$timestamp->add(0,0,1); 
-echo 'In one hour the time is: '.$timestamp->getReadable(); 
-</code> 
- 
-===== 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. 
timestamp_class.1576102538.txt.gz · Last modified: 2019/12/11 22:15 by sahl

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki