note 80018 deleted from function.time by danbrown

From: Date: Sat, 25 Apr 2009 14:47:14 +0000
Subject: note 80018 deleted from function.time by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-153714@lists.php.net to get a copy of this message
Note Submitter: miguelangeldavila at yahoo dot com dot mx ---- PHP is affected by the Y2K38 bug. <?php $current_time = time(); $years_from_now = 50; $remaining_seconds = 60 * 60 * 24 * 365 * $years_from_now; $future_unix_time = $current_time + $remaining_seconds; $future_date = date('Y-m-d', $future_unix_time); echo $future_date; // 1921-11-05 ?> It is caused because the PHP uses the C 32 bits time function

« previous php.notes (#153714) next »