Browse Source

Properly handle timezones on all configurations
Fixes #172

Alan Hardman 3 years ago
parent
commit
385cf8a792
4 changed files with 3 additions and 1 deletions
  1. 1 0
      index.php
  2. 1 0
      test/base.php
  3. 0 1
      test/strings.php
  4. 1 0
      tests/bootstrap.php

+ 1 - 0
index.php

@@ -13,6 +13,7 @@ $f3->mset(array(
 	"CACHE" => true,
 	"AUTOLOAD" => "app/;lib/vendor/",
 	"PACKAGE" => "Phproject",
+	"TZ" => "UTC",
 	"microtime" => microtime(true),
 	"site.url" => $f3->get("SCHEME") . "://" . $f3->get("HOST") . $f3->get("BASE") . "/"
 ));

+ 1 - 0
test/base.php

@@ -16,6 +16,7 @@ $f3->mset(array(
 	"AUTOLOAD" => $homedir."app/",
 	"TEMP" => $homedir."tmp/",
 	"ESCAPE" => false,
+	"TZ" => "UTC",
 ));
 
 // Load local configuration

+ 0 - 1
test/strings.php

@@ -42,7 +42,6 @@ $test->expect(
 );
 
 
-date_default_timezone_set("Etc/UTC");
 $f3->set("site.timezone", "America/Phoenix");
 $test->expect(
 	$view->utc2local(1420498500) == 1420473300,

+ 1 - 0
tests/bootstrap.php

@@ -12,4 +12,5 @@ $f3->mset(array(
 	"CACHE" => false,
 	"AUTOLOAD" => "app/;lib/vendor/",
 	"PACKAGE" => "Phproject",
+	"TZ" => "UTC",
 ));