Skip to content

Commit

Permalink
set the default date in the main class script so other tasks that
Browse files Browse the repository at this point in the history
require date() don't break.
  • Loading branch information
tamagokun committed Oct 22, 2013
1 parent cfcede5 commit eef136e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/Pomander.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public static function resolve_runfile($directory)
}
}

// set default date
if(function_exists('date_default_timezone_set')) date_default_timezone_set('UTC');

set_error_handler(function($errno,$errstr,$errfile,$errline) {
puts("aborted!");
puts("$errstr\n");
Expand Down
1 change: 0 additions & 1 deletion lib/Pomander/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public function __set($prop,$value) { $this->config[$prop] = $value; }

public function new_release()
{
if(function_exists('date_default_timezone_set')) date_default_timezone_set('UTC');
return date('Ymdhis');
}

Expand Down

0 comments on commit eef136e

Please sign in to comment.