Skip to content

Commit

Permalink
Set the timezone to the ENV when its provided, needed after going fro…
Browse files Browse the repository at this point in the history
…m 3.18 to 3.21 of nginx
  • Loading branch information
austinwbest committed Jan 22, 2025
1 parent db5d941 commit d406eb8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions root/app/www/public/loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
// This will NOT report uninitialized variables
error_reporting(E_ERROR | E_PARSE);

if ($_SERVER['TZ']) {
date_default_timezone_set($_SERVER['TZ']);
}

//-- USE THIS VARIABLE TO BYPASS THINGS NOT NEEDED FOR THE SSE EVENT, ~250ms to ~80MS
define('IS_SSE', (str_contains($_SERVER['PHP_SELF'], 'sse') && !str_contains($_SERVER['PHP_SELF'], 'cron') ? true : false));

Expand Down

0 comments on commit d406eb8

Please sign in to comment.