php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55862 bad return format for strtotime
Submitted: 2011-10-06 15:28 UTC Modified: 2017-01-12 21:08 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: julien_muetton at carpe-hora dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.3.8 OS: Linux/debian
Private report: No CVE-ID: None
 [2011-10-06 15:28 UTC] julien_muetton at carpe-hora dot com
Description:
------------
some timestamps returns a negative value but should return false according to the 
valid formats.

Test script:
---------------
<?php

// valid timestamp for 2011-10-26
var_dump(strtotime(1319580000)); // returns int(-62143152563) 
                                 // but should return false



Expected result:
----------------
bool(false)

Actual result:
--------------
int(-62143152563)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-12 21:08 UTC] heiglandreas@php.net
-Status: Open +Status: Not a bug
 [2017-01-12 21:08 UTC] heiglandreas@php.net
Quoting the manual at http://php.net/en/strtotime: "Parse about any English textual datetime description into a Unix timestamp". As a timestamp does not qualify as an "English textual datetime description" I'm closing this issue.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 19:01:27 2024 UTC