[Vtigercrm-developers] DateTime handling issue of vtiger 6.1 SVN 14155

Prasad prasad at vtiger.com
Mon Jun 30 04:53:50 GMT 2014


Istvan,

What does (default_timezone) in the configuration file?
What does (timezone) set through user-preferences?

Regards,
Prasad

*Connect with us on: *Twitter <http://twitter.com/vtigercrm> *I* Facebook
<http://www.facebook.com/pages/vtiger/226866697333578?sk=wall> *I* Blog
<https://blogs.vtiger.com/>* I* Wiki
<http://wiki.vtiger.com/index.php/Main_Page> *I *Forums
<https://discussions.vtiger.com>*I* Website <https://www.vtiger.com/>


On Fri, Jun 27, 2014 at 8:23 PM, Holbok István <holbok at gmail.com> wrote:

>  Dear Vtiger Team,
>
> I have found today an interesting issue about date-time handling of vtiger
> 6.1 SVN 14155 (latest).
>
> There is a function in *include/fields/DateTimeField.php* ::
> *getDBInsertDateTimeValue*( Users $user = null )
> This function should give the exact date-time of a User corrected to the
> user settings.
>
> The system for the testing is Windows 8.1 / XAMPP, with php 5.4.19, the
> php was set to the UTC+1 time zone.
>
> There are *different results* of the date-time function calling.
> (1) Call
> $vt_now=new DateTimeField(null);
> $syncdate = $vt_now->getDBInsertDateTimeValue($current_user);
> ( the $current_user's date-time was set in the settings to UTC+1 )
> The result was: $syncdate = 2014-06-27 12:13:40  (*= UTC-2*, without
> summer correction)
>
> (2) Call
> In the next row of the code was an other call:
> $controldate = date("Y-m-d H:i:s");
> The result was: $controldate = 2014-06-27 14:13:41  (*= **UTC* without
> summer correction, or *UTC-1* with summer correction)
>
> (3) Call
> In the next row of the code was an other call:
> $vt_now=new DateTimeField(null);
> $synctime = $vt_now->getDisplayTime($current_user);
> The result was: $synctime = 16:13:41  (*= UTC+1*, with summer correction)
>
> The exact date-time of that moment was : 2014-06-27 16:13:41 (*= UTC+1*,
> with summer correction)
>
> If I remember well, the *DBInsertDateTimeValue *should give UTC time, but
> not an UTC-2 hour time (or UTC-3 with summer correction).
> So, there is something wrong. I kindly ask you to review this issue.
>
> Regards:
> Istvan
>
> --
> üdvözlettel:
>
> *Holbok István*
>
> +3670-342-0900
> *e-mail:* holbok at gmail.com
> *SkyPe:* holboki
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140630/ba18fdb3/attachment.html>


More information about the vtigercrm-developers mailing list