<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body smarttemplateinserted="true" text="#000000" bgcolor="#FFFFFF">
Dear Vtiger Team,<br>
<br>
I have found today an interesting issue about date-time handling of
vtiger 6.1 SVN 14155 (latest).<br>
<br>
There is a function in <b>include/fields/DateTimeField.php</b> :: <b>getDBInsertDateTimeValue</b>(
Users $user = null )<br>
This function should give the exact date-time of a User corrected to
the user settings.<br>
<br>
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.<br>
<br>
There are <b>different results</b> of the date-time function
calling.<br>
(1) Call<br>
$vt_now=new DateTimeField(null);<br>
$syncdate = $vt_now->getDBInsertDateTimeValue($current_user); <br>
( the $current_user's date-time was set in the settings to UTC+1 )<br>
The result was: $syncdate = 2014-06-27 12:13:40 (<b>= UTC-2</b>,
without summer correction)<br>
<br>
(2) Call<br>
In the next row of the code was an other call:<br>
$controldate = date("Y-m-d H:i:s");<br>
The result was: $controldate = 2014-06-27 14:13:41 (<b>= </b><b>UTC</b>
without summer correction, or <b><b>UTC</b>-1</b> with summer
correction)<br>
<br>
(3) Call<br>
In the next row of the code was an other call:<br>
$vt_now=new DateTimeField(null);<br>
$synctime = $vt_now->getDisplayTime($current_user);<br>
The result was: $synctime = 16:13:41 (<b>= UTC+1</b>, with summer
correction)<br>
<br>
The exact date-time of that moment was : 2014-06-27 16:13:41 (<b>=
UTC+1</b>, with summer correction)<br>
<br>
If I remember well, the <b>DBInsertDateTimeValue </b>should give
UTC time, but not an UTC-2 hour time (or UTC-3 with summer
correction).<br>
So, there is something wrong. I kindly ask you to review this issue.<br>
<br>
Regards:<br>
Istvan<br>
<br>
<div class="moz-signature">-- <br>
üdvözlettel:<br>
<br>
<b>Holbok István</b><br>
<br>
+3670-342-0900<br>
<b>e-mail:</b> <a class="moz-txt-link-abbreviated" href="mailto:holbok@gmail.com">holbok@gmail.com</a><br>
<b>SkyPe:</b> holboki<br>
<br>
</div>
</body>
</html>