Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.

Commit 8b10ec9

Browse files
committed
Use UTC timezone for testing pre-epoch dates
The expected value differed in some newer versions of PHP (with updated timezone DBs). Sticking with UTC keeps the test more resilient to such changes, while still allowing us to deal with negative timestamps.
1 parent f37414d commit 8b10ec9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/generic/bug00667.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ $m = new_mongo_standalone();
1313
$c = $m->selectCollection(dbname(), 'bug667');
1414
$c->drop();
1515

16-
$mongoDate = new MongoDate(strtotime('1900-01-01 America/New_York'));
16+
$mongoDate = new MongoDate(strtotime('1900-01-01 UTC'));
1717
$c->insert(array('date' => $mongoDate));
1818

1919
$document = $c->findOne();
@@ -22,5 +22,5 @@ printf("%s\n", $mongoDate);
2222
printf("%s\n", $document['date']);
2323

2424
--EXPECT--
25-
0.00000000 -2208970800
26-
0.00000000 -2208970800
25+
0.00000000 -2208988800
26+
0.00000000 -2208988800

0 commit comments

Comments
 (0)