[Vtigercrm-developers] $default_timezone and a world of pain
Uma S
uma.s at vtiger.com
Fri May 8 05:50:12 GMT 2015
Hi,
Thanks! for notification will look into this soon.
On Thu, May 7, 2015 at 6:47 PM, Alan Bell <alan.bell at libertus.co.uk> wrote:
> In short, always set $default_timezone in config.inc.php to UTC and all
> will be well.
>
> in this file:
> include/fields/DateTimeField.php
> there is a function:
> static function getDBTimeZone() {
> if(empty(self::$databaseTimeZone)) {
> $defaultTimeZone = date_default_timezone_get();
> if(empty($defaultTimeZone)) {
> $defaultTimeZone = 'UTC';
> }
> self::$databaseTimeZone = $defaultTimeZone;
> }
> return self::$databaseTimeZone;
> }
>
> the effect of this is that if you have specified something like
> 'Europe/London' in your config.inc.php then vtiger 6.2 will store all
> datetime fields in your system's default time zone rather than UTC. This
> looks like it is working OK for a while in the vtiger user interface. After
> daylight savings or British summer time happens then the system will mess
> up times that were saved with the other offset. It also completely messes
> up synchronisation with exchange/android/ipad/anything else because those
> all expect the system to store UTC internally.
>
> $default_timezone basically performs two functions now, it is the default
> timezone for new users (or users who have no timezone specified, but I
> don't know how to do that) and it is also the database timezone, which is a
> bit scary. I can't see any reason why anyone would ever want the database
> to be storing times in anything but UTC, and especially not in a zone with
> daylight savings.
>
> Alan.
> _______________________________________________
> http://www.vtiger.com/
>
--
With
Best Regards
Uma.S
Vtiger Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150508/493924ac/attachment.html>
More information about the vtigercrm-developers
mailing list