User Tools

Site Tools


uphp:functions:time

Differences

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

Link to this comparison view

uphp:functions:time [2017/05/06 13:14]
jeff
uphp:functions:time [2021/09/13 05:57]
Line 1: Line 1:
-======time====== 
- 
-<badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> 
- 
-Return current system timestamp 
- 
-====Description==== 
- 
-<well size="sm"> 
-<html> 
-<span style="font-size:125%;color:green">int 
-<span style="color:black"> 
-</html> 
-[[time]] ( ) 
-</well> 
- 
-Returns the current time measured in the number of seconds since January 1, 1970, 00:00:00 
- 
-====Parameters==== 
- 
-None 
- 
-====Return Value==== 
- 
-<html><b><span style="color:green">Integer<span style="color:black"></b></html>:  Seconds since January 1, 1970, 00:00:00, local Wattmon time 
- 
-====Notes==== 
- 
-Unlike mainline PHP, in uPHP "Linux timestamps" are based upon the Wattmon's local time, not UTC/GMT. 
- 
-Technically, the Unix Epoch is defined as being January 1, 1970, 00:00:00 GMT. But on the Wattmon, timestamps are relative to January 1, 1970, 00:00:00 //local timezone//. 
- 
-If the Wattmon clock and timezone are set to UTC+00 (GMT) then the uPHP timestamp //is// the same as mainline PHP, otherwise not. 
- 
-In uPHP on the Wattmon this simplification is referred to as a "Linux timestamp" but it should be noted that it may not be exactly the same, depending on the Wattmon's timezone settings. 
- 
-In other words:  Wattmon "Linux timestamps" are based upon local Wattmon time and do not consider the timezone setting in Control Panel > Time Settings (Time and Date Settings) > UTC Offset.  (These settings are stored in ''/config/time.ini''.) 
- 
-====See Also==== 
- 
-[[microtime()]] - Return number of milliseconds since boot 
- 
-[[mktime()]] - Return Linux timestamp for a given date and time 
- 
-[[settime()]] - Set the system time from a Linux timestamp 
- 
-[[strftime()]] - Format a Linux timestamp using a format <html><b><span style="color:green">string</b></html> 
- 
-[[timefromfat()]] - Convert a FAT filetime to a Linux timestamp 
- 
-[[uptime()]] - Return uptime in milliseconds 
  
uphp/functions/time.txt · Last modified: 2021/09/13 05:57 (external edit)