Drupal timezone information

Posted by Sebastian Hoitz on Stack Overflow See other posts from Stack Overflow or by Sebastian Hoitz
Published on 2010-04-24T19:08:00Z Indexed on 2010/04/24 19:13 UTC
Read the original article Hit count: 351

Filed under:
|
|

In my drupal installation I can get the offset from UTC in seconds to the timezone I specified in the admin panel using

variable_get('date_default_timezone', 0)

However, now that we have daylight-saving-time, the time I get is always off by one hour. Is there a way to retrieve the actual timezone string from Drupal, as "Europe/Berlin" for example?

The reason is, that I have to use this with Zend Framework's Zend_Date, but Drupal does not set the PHP default timezone, as

echo date_default_timezone_get();

gives me System/Localtime.

© Stack Overflow or respective owner

Related posts about php

Related posts about drupal