Permalink
Browse files

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

…ne` setting.
  • Loading branch information...
ludovicchabant committed Jan 29, 2013
1 parent 2eab9e0 commit 2a89b68542653b86e0e0c9e1d38bec2a0fab781b
Showing with 6 additions and 3 deletions.
  1. +0 −3 piecrust.php
  2. +6 −0 src/PieCrust/PieCrustConfiguration.php
View
@@ -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)
{
@@ -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;
}

0 comments on commit 2a89b68

Please sign in to comment.