<div dir="ltr">Istvan,<div><br></div><div>What does (default_timezone) in the configuration file? </div><div>What does (timezone) set through user-preferences?</div><div><br></div><div>Regards,</div><div>Prasad</div></div>
<div class="gmail_extra"><br clear="all"><div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><b>Connect with us on: </b><a href="http://twitter.com/vtigercrm" style="color:rgb(0,0,204)" target="_blank">Twitter</a> <b>I</b> <a href="http://www.facebook.com/pages/vtiger/226866697333578?sk=wall" style="color:rgb(0,0,204)" target="_blank">Facebook</a> <b>I</b> <a href="https://blogs.vtiger.com/" style="color:rgb(0,0,204)" target="_blank">Blog</a><b> I</b> <a href="http://wiki.vtiger.com/index.php/Main_Page" style="color:rgb(0,0,204)" target="_blank">Wiki</a> <b>I </b><a href="https://discussions.vtiger.com" style="color:rgb(0,0,204)" target="_blank">Forums </a><b>I</b> <a href="https://www.vtiger.com/" style="color:rgb(0,0,204)" target="_blank">Website</a></span></div>
<br><br><div class="gmail_quote">On Fri, Jun 27, 2014 at 8:23 PM, Holbok István <span dir="ltr"><<a href="mailto:holbok@gmail.com" target="_blank">holbok@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div 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<span class="HOEnZb"><font color="#888888"><br>
<br>
<div>-- <br>
üdvözlettel:<br>
<br>
<b>Holbok István</b><br>
<br>
+3670-342-0900<br>
<b>e-mail:</b> <a href="mailto:holbok@gmail.com" target="_blank">holbok@gmail.com</a><br>
<b>SkyPe:</b> holboki<br>
<br>
</div>
</font></span></div>
<br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br></div>