[PHP-BUG] Bug #52152 [NEW]: DST detection works wrong with late dates (TS over int32)
From: Operating system: Ubuntu i686 2.6.32-22-generic PHP version: 5.3.2 Package: Date/time related Bug Type: Bug Bug description:DST detection works wrong with late dates (TS over int32) Description: DST detection for late dates (timestamp over int32) Test script: --- $date = new DateTime('2020-05-25 12:00:00', new DateTimeZone('Europe/Warsaw')); echo $date->format(DateTime::ATOM), ' ', $date->format('I U'); $date = new DateTime('2050-05-25 12:00:00', new DateTimeZone('Europe/Warsaw')); echo $date->format(DateTime::ATOM), ' ', $date->format('I U'); Expected result: 2020-05-25T12:00:00+02:00 1 1590400800 2050-05-25T12:00:00+02:00 1 2537089200 Actual result: -- 2020-05-25T12:00:00+02:00 1 1590400800 2050-05-25T12:00:00+01:00 0 2537089200 -- Edit bug report at http://bugs.php.net/bug.php?id=52152&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52152&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52152&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52152&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52152&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52152&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52152&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52152&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52152&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52152&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52152&r=support Expected behavior: http://bugs.php.net/fix.php?id=52152&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52152&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52152&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52152&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52152&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=52152&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52152&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52152&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52152&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52152&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52152&r=mysqlcfg
[PHP-BUG] Bug #52283 [NEW]: IntlDateFormatter invalid parsing with YYYY
From: Operating system: WinXP PHP version: 5.3.2 Package: I18N and L10N related Bug Type: Bug Bug description:IntlDateFormatter invalid parsing with Description: Parsing a value with in the pattern returns unexpected results. Formatting the value using the in the pattern works perfect. Test script: --- $fmt = new IntlDateFormatter('lt_LT', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'Europe/Vilnius', IntlDateFormatter::GREGORIAN); $value = '2007-10-01'; // notice, that 2007-01-01 equals to 2007-W01-1 $variants = array(); $fmt->setPattern(''); $pts = $fmt->parse($value); $variants[] = array($pts, $fmt->format($pts)); $fmt->setPattern('-MM'); $pts = $fmt->parse($value); $variants[] = array($pts, $fmt->format($pts)); $fmt->setPattern('-MM-dd'); $pts = $fmt->parse($value); $variants[] = array($pts, $fmt->format($pts)); $fmt->setPattern(''); $pts = $fmt->parse($value); $variants[] = array($pts, $fmt->format($pts)); $fmt->setPattern('-MM'); $pts = $fmt->parse($value); $variants[] = array($pts, $fmt->format($pts)); $fmt->setPattern('-MM-dd'); $pts = $fmt->parse($value); $variants[] = array($pts, $fmt->format($pts)); print_r($variants); Expected result: array ( 0 => array ( 0 => 1167602400, 1 => '2007', ), 1 => array ( 0 => 1191186000, 1 => '2007-10', ), 2 => array ( 0 => 1191186000, 1 => '2007-10-01', ), 3 => array ( 0 => 1167602400, 1 => '2007', ), 4 => array ( 0 => 1191186000, 1 => '2007-10', ), 5 => array ( 0 => 1191186000, 1 => '2007-10-01', ), ) Actual result: -- array ( 0 => array ( 0 => 1167602400, 1 => '2007', ), 1 => array ( 0 => 1191186000, 1 => '2007-10', ), 2 => array ( 0 => 1191186000, 1 => '2007-10-01', ), 3 => array ( 0 => 1166997600, 1 => '2006', ), 4 => array ( 0 => 1166997600, 1 => '2006-12', ), 5 => array ( 0 => 23576400, 1 => '1970-10-01', ), ) -- Edit bug report at http://bugs.php.net/bug.php?id=52283&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52283&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52283&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52283&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52283&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52283&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52283&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52283&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52283&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52283&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52283&r=support Expected behavior: http://bugs.php.net/fix.php?id=52283&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52283&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52283&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52283&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52283&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=52283&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52283&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52283&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52283&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52283&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52283&r=mysqlcfg
[PHP-BUG] Bug #52290 [NEW]: setDate, setISODate, setTime works wrong when DateTime created from timestamp
From: Operating system: WinXP x86 PHP version: 5.3.2 Package: Date/time related Bug Type: Bug Bug description:setDate, setISODate, setTime works wrong when DateTime created from timestamp Description: setDate, setISODate, setTime works wrong Test script: --- $tz = 'UTC'; date_default_timezone_set($tz); $ts = strtotime('2006-01-01'); $dt = new DateTime('@'.$ts); $dt->setTimezone(new DateTimeZone($tz)); echo $dt->format('o-\WW-N | Y-m-d | H:i:s | U'), "\n"; $dt->setISODate(2005, 52, 1); echo $dt->format('o-\WW-N | Y-m-d | H:i:s | U'), "\n"; $dt->setDate(2007, 10, 10); echo $dt->format('o-\WW-N | Y-m-d | H:i:s | U'), "\n"; $dt->setTime(20, 30, 40); echo $dt->format('o-\WW-N | Y-m-d | H:i:s | U'), "\n"; Expected result: 2005-W52-7 | 2006-01-01 | 00:00:00 2005-W52-1 | 2005-12-26 | 00:00:00 2007-W40-5 | 2007-10-10 | 00:00:00 2007-W40-5 | 2007-10-10 | 20:30:40 Actual result: -- 2005-W52-7 | 2006-01-01 | 00:00:00 | 1136073600 2041-W52-4 | 2041-12-26 | 00:00:00 | 2271628800 2044-W40-1 | 2044-10-03 | 00:00:00 | 2359065600 2081-W39-6 | 2081-09-27 | 20:30:40 | 3526230640 -- Edit bug report at http://bugs.php.net/bug.php?id=52290&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52290&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52290&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52290&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52290&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52290&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52290&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52290&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52290&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52290&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52290&r=support Expected behavior: http://bugs.php.net/fix.php?id=52290&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52290&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52290&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52290&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52290&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=52290&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52290&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52290&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52290&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52290&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52290&r=mysqlcfg