ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:datetime:adodb_gmmktime

Differences

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

Link to this comparison view

Next revision
Previous revision
datetime:adodb_gmmktime [2015/11/26 16:19] – created mnewnhamv5:datetime:adodb_gmmktime [2023/05/18 18:54] (current) – Deprecated dregad
Line 9: Line 9:
      int $min,       int $min, 
      int $sec ,      int $sec ,
-     int $month, +     optional int $month, 
-     int $day, +     optional int $day, 
-     int $year+     optional int $year
      )      )
 </WRAP> </WRAP>
 +
 +<WRAP important>
 +[[datetime_index#deprecated|Deprecated]] since ADOdb 5.22.6, and [[https://github.com/ADOdb/ADOdb/issues/970|removed in 5.23.0]].
 +Use 64-bit native PHP functions instead.
 +</WRAP>
 +
 ===== Description ===== ===== Description =====
-This function converts a gmt date to a unix timestamp.  Unlike the function gmmktime(), it supports dates outside the 1901 to 2038 range. The function differs from gmmktime() in that all parameters are currently compulsory.+This function converts a gmt date to a unix timestamp.  Unlike the function gmmktime(), it supports dates outside the 1901 to 2038 range. 
 +-------------------------------------- 
 +===== Usage ===== 
 +<code php> 
 +$t = adodb_gmmktime(12,10,0,6,20,1066)
 + 
 +print $t; 
 +/* 
 +* Prints -28512190200 
 +*/ 
 + 
 +$d = adodb_gmdate('m/d/Y H:i:s',$t); 
 +print $d; 
 + 
 +/* 
 +* prints 06/20/1066 12:10:00 
 +*/ 
 +</code>
v5/datetime/adodb_gmmktime.1448551192.txt.gz · Last modified: 2017/04/21 11:27 (external edit)