php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15123 strtotime doesn't work with long date format
Submitted: 2002-01-20 06:42 UTC Modified: 2003-07-28 04:55 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: htheking at gmx dot de Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.1.1 OS: Linux 2.4.16 & 2.2.16
Private report: No CVE-ID: None
 [2002-01-20 06:42 UTC] htheking at gmx dot de
Perl 4.1.1 compiled as CGI
configure line: "./configure"
test OK. Everything works but this:
(the date comes from a logfile)

#! /usr/local/bin/php
<?php
$input = 'Sat Jan 19 00:01:00 2002';
$startdate = strtotime($input);
echo ("startdate:\n$startdate \n");
?>

Output:
X-Powered-By: PHP/4.1.1
Content-type: text/html

startdate:
-1

Other dates like 'Fri, Jan 18 00:01:00 2002' ->same problem


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-20 09:44 UTC] htheking at gmx dot de

 [2002-05-25 06:36 UTC] derick@php.net
Dup of #16517
 [2003-01-20 17:25 UTC] sniper@php.net
Actually this is dup of: #13142
 [2003-07-28 04:55 UTC] sniper@php.net
fixed in CVS.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 17:01:30 2024 UTC