Permalink
Browse files

Moved safe locale and timezone to environment

  • Loading branch information...
1 parent d13607d commit e93a343c7d6afbbd7875b1f86b526f2b6c9fa440 @kukulich kukulich committed Sep 15, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −0 ApiGen/Environment.php
  2. +0 −6 apigen.php
View
@@ -47,6 +47,12 @@ public static function getRootDir()
public static function init()
{
+ // Safe locale and timezone
+ setlocale(LC_ALL, 'C');
+ if (!ini_get('date.timezone')) {
+ date_default_timezone_set('UTC');
+ }
+
$rootDir = static::getRootDir();
spl_autoload_register(function($className) use ($rootDir) {
View
@@ -16,12 +16,6 @@
use Nette\Diagnostics\Debugger;
-// Safe locale and timezone
-setlocale(LC_ALL, 'C');
-if (!ini_get('date.timezone')) {
- date_default_timezone_set('UTC');
-}
-
// Check environment
try {
require __DIR__ . '/ApiGen/Environment.php';

0 comments on commit e93a343

Please sign in to comment.