[Vtigercrm-developers] DateTime handling issue of vtiger 6.1 SVN 14155
Holbok István
holbok at gmail.com
Fri Jun 27 14:53:05 GMT 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140627/f7f8c7af/attachment.html>
More information about the vtigercrm-developers
mailing list