Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't set the timezone by default, but add support for a `site/timezo…

…ne` setting.
  • Loading branch information...
commit 2a89b68542653b86e0e0c9e1d38bec2a0fab781b 1 parent 2eab9e0
@ludovicchabant authored
Showing with 6 additions and 3 deletions.
  1. +0 −3  piecrust.php
  2. +6 −0 src/PieCrust/PieCrustConfiguration.php
View
3  piecrust.php
@@ -90,9 +90,6 @@ function piecrust_setup($profile = 'web')
$loader->add('Console_', $libsDir . '/pear');
$loader->add('Log_', $libsDir . '/pear');
- // Set the time zone.
- date_default_timezone_set('UTC');
-
// Set error handling.
switch ($profile)
{
View
6 src/PieCrust/PieCrustConfiguration.php
@@ -253,6 +253,12 @@ public static function getValidatedConfig($config)
),
$config[$blogKey]);
}
+
+ // Set the timezone if it's specified.
+ if (isset($config['site']['timezone']))
+ {
+ date_default_timezone_set($config['site']['timezone']);
+ }
return $config;
}
Please sign in to comment.
Something went wrong with that request. Please try again.