Skip to content

Instantly share code, notes, and snippets.

@Natetronn
Forked from 1stevengrant/config.php
Created October 28, 2012 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Natetronn/3969720 to your computer and use it in GitHub Desktop.
Save Natetronn/3969720 to your computer and use it in GitHub Desktop.
Fixes the daylight savings issue with EE
var $dateTime = new DateTime();
$dateTime->setTimezone(new DateTimeZone('America/New_york'));
$dateTime->setTimestamp(time());
$isDst = (bool)$dateTime->format('I') ? "y" : "n";
$conf['daylight_savings'] = $isDst;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment