Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //TIMEZONE INFOS
- $timezone=1;
- if(trim($c->getConfig("DaylightSaving")=="on"))$daylight_saving=true;
- else $daylight_saving=false;
- $utctimezone = new DateTimeZone("UTC");
- $utcdate = new DateTime("now", $utctimezone);
- if($timezone>=0) $timezone_final="+".$timezone;
- $timezone_final="Etc/GMT".$timezone;
- if($daylight_saving) {
- if($timezone==0) $timezone_final="Europe/London";
- if($timezone==1) $timezone_final="Europe/Vienna";
- //TODO
- }
- $localtimezone = new DateTimeZone($timezone_final);
- $localdate = new DateTime("now", $localtimezone);
- //$timeOffset = $utcdate->getOffset($localdate);
- $timeOffset=timezone_offset_get($localtimezone,$utcdate);
Add Comment
Please, Sign In to add comment