php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45359 strtotime: negative timestamps var_dump(strtotime('1214431948'));
Submitted: 2008-06-25 20:03 UTC Modified: 2008-06-25 21:06 UTC
From: ovidiu dot leferman at gmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.2.6 OS: Vista Ultimate 32B Sp1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ovidiu dot leferman at gmail dot com
New email:
PHP Version: OS:

 

 [2008-06-25 20:03 UTC] ovidiu dot leferman at gmail dot com
Description:
------------
var_dump(strtotime('1214431944'));
returning int(-805297517)




Reproduce code:
---------------
var_dump(strtotime('1214431944'));

Expected result:
----------------
false / -1

Actual result:
--------------
int(-805297517)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-25 21:06 UTC] derick@php.net
THis is not a bug, it simply parses this as "12:13:43 1948"):

derick@kossu:~$ php -r 'var_dump(date_parse("1214431944"));'
array(12) {
  ["year"]=>
  int(1944)
  ["month"]=>
  bool(false)
  ["day"]=>
  bool(false)
  ["hour"]=>
  int(12)
  ["minute"]=>
  int(14)
  ["second"]=>
  int(43)
  ["fraction"]=>
  float(0)
  ["warning_count"]=>
  int(0)
  ["warnings"]=>
  array(0) {
  }
  ["error_count"]=>
  int(0)
  ["errors"]=>
  array(0) {
  }
  ["is_localtime"]=>
  bool(false)
}

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 03:01:31 2025 UTC