Browse Source

- Fixed bug #52454 (Relative dates and getTimestamp increments by one day)

experimental/with_scalar_types
Derick Rethans 16 years ago
parent
commit
fcc22c6af3
  1. 1
      ext/date/lib/tm2unixtime.c
  2. 22
      ext/date/tests/bug52454.phpt

1
ext/date/lib/tm2unixtime.c

@ -444,6 +444,7 @@ void timelib_update_ts(timelib_time* time, timelib_tzinfo* tzi)
time->sse = res;
time->sse_uptodate = 1;
time->have_relative = time->relative.have_weekday_relative = time->relative.have_special_relative = 0;
}
#if 0

22
ext/date/tests/bug52454.phpt

@ -0,0 +1,22 @@
--TEST--
Bug #52454 (Relative dates and getTimestamp increments by one day)
--FILE--
<?php
date_default_timezone_set('Europe/London');
$endOfWeek = new DateTime('2010-07-27 09:46:49');
$endOfWeek->modify('this week +6 days');
echo $endOfWeek->format('Y-m-d H:i:s')."\n";
echo $endOfWeek->format('U')."\n";
/* Thar she blows! */
echo $endOfWeek->getTimestamp()."\n";
echo $endOfWeek->format('Y-m-d H:i:s')."\n";
?>
--EXPECT--
2010-08-01 09:46:49
1280652409
1280652409
2010-08-01 09:46:49
Loading…
Cancel
Save