From 8b10ec9271f51b077815ef32d17d02037b98f7bf Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Tue, 9 Jun 2015 16:26:04 -0400 Subject: [PATCH] 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. --- tests/generic/bug00667.phpt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/generic/bug00667.phpt b/tests/generic/bug00667.phpt index 3ccd0897a..e02e767f5 100644 --- a/tests/generic/bug00667.phpt +++ b/tests/generic/bug00667.phpt @@ -13,7 +13,7 @@ $m = new_mongo_standalone(); $c = $m->selectCollection(dbname(), 'bug667'); $c->drop(); -$mongoDate = new MongoDate(strtotime('1900-01-01 America/New_York')); +$mongoDate = new MongoDate(strtotime('1900-01-01 UTC')); $c->insert(array('date' => $mongoDate)); $document = $c->findOne(); @@ -22,5 +22,5 @@ printf("%s\n", $mongoDate); printf("%s\n", $document['date']); --EXPECT-- -0.00000000 -2208970800 -0.00000000 -2208970800 +0.00000000 -2208988800 +0.00000000 -2208988800