Skip to content

Commit

Permalink
adjustment to make sure we always have a valid timezone set, even whe…
Browse files Browse the repository at this point in the history
…n converting from w2p
  • Loading branch information
caseysoftware committed Jul 17, 2014
1 parent 3570f05 commit dae8d20
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions classes/w2p/Core/CAppUI.class.php
Expand Up @@ -242,6 +242,7 @@ public function convertToSystemTZ($datetime = '', $format = 'Y-m-d H:i:s')
public function formatTZAwareTime($datetime = '', $format = '')
{
$userTimezone = $this->getPref('TIMEZONE');
$userTimezone = ('' == $userTimezone) ? 'UTC' : $userTimezone;
$userTZ = new DateTimeZone($userTimezone);
$systemTZ = new DateTimeZone('UTC');
$ts = new DateTime($datetime, $systemTZ);
Expand Down

0 comments on commit dae8d20

Please sign in to comment.