Browse Source

Further fixes for test timezone assumptions

microsub
J. King 6 years ago
parent
commit
dd7d6e44b9
  1. 2
      tests/cases/Misc/TestValueInfo.php
  2. 2
      tests/lib/Db/BindingTests.php

2
tests/cases/Misc/TestValueInfo.php

@ -456,7 +456,7 @@ class TestValueInfo extends Test\AbstractTest {
["Fri, 01 Jan 2010 00:00:00 GMT", null, null, null, $this->t(1262304000), null, null, null, null, null, null, $this->t(1262304000), ],
["2010-01-01 00:00:00", null, null, null, null, $this->t(1262304000), null, null, null, null, null, $this->t(1262304000), ],
["2010-01-01", null, null, null, null, null, $this->t(1262304000), null, null, null, null, $this->t(1262304000), ],
["12:34:56", null, null, null, null, null, null, $this->t(45296), null, null, null, $this->t(strtotime("Today UTC")+45296), ],
["12:34:56", null, null, null, null, null, null, $this->t(45296), null, null, null, $this->t(date_create("today", new \DateTimezone("UTC"))->getTimestamp()+45296), ],
["1262304000", null, null, null, null, null, null, null, $this->t(1262304000), null, null, null, ],
["1262304000.123456", null, null, null, null, null, null, null, null, $this->t(1262304000.123456), null, null, ],
["1262304000.42", null, null, null, null, null, null, null, null, $this->t(1262304000.42), null, null, ],

2
tests/lib/Db/BindingTests.php

@ -213,7 +213,7 @@ trait BindingTests {
public function testBindArbitraryDateString() {
$input = "Today";
$time = strtotime($input." UTC");
$time = date_create($input, new \DateTimezone("UTC"))->getTimestamp();
$exp = [
"null" => null,
"integer" => 0,

Loading…
Cancel
Save