php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54102 Conflicts of regular expressions in parse_date.re
Submitted: 2011-02-25 18:15 UTC Modified: -
From: tomas dot brastavicius at quantum dot lt Assigned:
Status: Open Package: Date/time related
PHP Version: 5.3.6RC1 OS: Ubuntu
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-02-25 18:15 UTC] tomas dot brastavicius at quantum dot lt
Description:
------------
Regular expression year4 conflicts with gnunocolon, and pointeddate2 with both timelong12 and timelong24.

Test script:
---------------
<?php
echo date("Y-m-d H:i:s", strtotime("2460")) . "\n";	// year4 was used
echo date("Y-m-d H:i:s", strtotime("2011")) . "\n";	// gnunocolon was used
echo date("Y-m-d H:i:s", strtotime("20.02.99")) . "\n";	// pointeddate2 was used
echo date("Y-m-d H:i:s", strtotime("20.02.11")) . "\n";	// timelong24 was used

Expected result:
----------------
Used single regular expression independently on date/time range

Actual result:
--------------
2460-02-25 15:17:46
2011-02-25 20:11:00
1999-02-20 00:00:00
2011-02-25 20:02:11


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC