Skip to content

Commit

Permalink
Fixing logic that broke the system if you did not have timezone set i…
Browse files Browse the repository at this point in the history
…n w2p, but had date.timezone set in your php.ini.

This resolves Bugg #513 - http://bugs.web2project.net/view.php?id=513
  • Loading branch information
trevormorse committed Jul 16, 2010
1 parent 5543c07 commit ab14f7f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/system/index.php
Expand Up @@ -37,7 +37,10 @@
}
echo '<br />';
$tzName = w2PgetConfig('system_timezone');
if (ini_get('date.timezone') || strlen($tzName) > 0) {
if(strlen($tzName) == 0) {
$tzName = ini_get('date.timezone');
}
if (strlen($tzName) > 0) {
$time = new DateTimeZone($tzName);
$x = new DateTime();
$offset = $time->getOffset($x);
Expand Down Expand Up @@ -126,4 +129,4 @@
<a href="?m=system&a=phpinfo&suppressHeaders=1" target="_blank"><?php echo $AppUI->_('PHP Info'); ?></a>
</td>
</tr>
</table>
</table>

0 comments on commit ab14f7f

Please sign in to comment.