On 05.12.2011, at 16:21, Roland Liebl wrote:
Hi Devs,
I'm currently implementing Timezone support in my calendar plugin. I think this should be integrated with Roundcube Timezone settings.
Is there a special reason why you save only the offset and DST in prefs?
There's no special reason but just historic stupidness. Up until now it was enough because the only purpose of the timezone setting was to translate email dates to display.
I also worked on a calendar plugin and came across the same problems. To get one step closer we meanwhile distinguish between Timezone and DST which allows you to select a timezone from the Olson database using the these two offsets:
$timezone = $this->rc->config->get('timezone'); $dst_active = $this->rc->config->get('dst_active'); $gmt_offset = ($timezone + $dst_active) * 3600; $user_timezone = new DateTimeZone($timezone ? timezone_name_from_abbr("", $gmt_offset, $dst_active) : 'GMT');
Feel free to make the necessary changes to the Roundcube core in order to have a proper timezone support. You will, however, face some difficulties when one uses "automatic" setting and the timezone has to be taken from the client browser. There we only have very limited means of reading the actual timezone settings.
Regards, Thomas
List info: http://lists.roundcube.net/dev/ BT/aba52c80