From: Peter L. <pal...@gm...> - 2010-05-11 08:10:41
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Scott,<br> thanks for the comments. I have done a little further investigation today, and the results are stranger than previously reported.<br> <br> The times for the start_time and stop_time in the _times database are showing correctly. When I run the query get_time_records from common.inc the times and duration are also shown correctly, including the unix timestamps. (<code class="sql"><span class="syntax"><span class="syntax_alpha syntax_alpha_reservedWord">SELECT</span> <span class="syntax_alpha syntax_alpha_identifier">start_time</span> <span class="syntax_alpha syntax_alpha_reservedWord">AS</span> <span class="syntax_alpha syntax_alpha_identifier">start_time_str</span><span class="syntax_punct syntax_punct_listsep">,</span> <span class="syntax_alpha syntax_alpha_identifier">end_time</span> <span class="syntax_alpha syntax_alpha_reservedWord">AS</span> <span class="syntax_alpha syntax_alpha_identifier">end_time_str</span><span class="syntax_punct syntax_punct_listsep">,</span> <span class="syntax_alpha syntax_alpha_functionName">unix_timestamp</span><span class="syntax_punct syntax_punct_bracket_open_round">(</span> <span class="syntax_alpha syntax_alpha_identifier">start_time</span> <span class="syntax_punct syntax_punct_bracket_close_round">)</span> <span class="syntax_alpha syntax_alpha_reservedWord">AS</span> <span class="syntax_alpha syntax_alpha_identifier">start_stamp</span><span class="syntax_punct syntax_punct_listsep">,</span> <span class="syntax_white syntax_white_newline"></span><span class="syntax_alpha syntax_alpha_functionName">unix_timestamp</span><span class="syntax_punct syntax_punct_bracket_open_round">(</span> <span class="syntax_alpha syntax_alpha_identifier">end_time</span> <span class="syntax_punct syntax_punct_bracket_close_round">)</span> <span class="syntax_alpha syntax_alpha_reservedWord">AS</span> <span class="syntax_alpha syntax_alpha_identifier">end_stamp</span><span class="syntax_punct syntax_punct_listsep">,</span> <span class="syntax_white syntax_white_newline"></span><span class="syntax_alpha syntax_alpha_identifier">duration </span><span class="syntax_alpha syntax_alpha_reservedWord">FROM</span> <span class="syntax_alpha syntax_alpha_identifier">ts1_times) </span></span></code>So that says to me that mysql is not stuffing up, nor is the start/stop clock panel in collecting and posting the times in the database. <br> <br> Now this is where it gets strange. In the daily timesheet display, all the Start times are correct. All the Stop times are into the next day. When I look at the code in daily.php, it looks like both Start and End times are being formatted exactly the same way. <br> <br> Now I just noticed in the paste of the web page below that the Total consists of two parts, and the "of nh nnm" is correct e.g second last row where start time is 16:32 and end time was set to 16:35, the duration of 0h 3m is correct. <br> <br> Does this suggest anything? <br> <br> Peter<br> <br> <table class="table_body" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody> <tr class="inner_table_head"> <td class="inner_table_column_heading" align="center">Client</td> <td class="inner_table_column_heading" align="center">Project</td> <td class="inner_table_column_heading" align="center">Task</td> <td class="inner_table_column_heading" width="10%" align="center">Start</td> <td class="inner_table_column_heading" width="10%" align="center">End</td> <td class="inner_table_column_heading" width="10%" align="center">Total</td> <td class="inner_table_column_heading" width="15%" align="center"><i>Actions</i></td> </tr> <tr> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('client_info.php?client_id=3','Client Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=500,height=200')">Lazarus Household</a></td> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('proj_info.php?proj_id=4','Project Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=500,height=200')">Update Ubuntu</a></td> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('task_info.php?task_id=62','Task Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=300,height=150')">Application Development</a></td> <td class="calendar_cell_middle" nowrap="nowrap" align="right">10:00</td> <td class="calendar_cell_middle" nowrap="nowrap" align="right"><font color="#909090"><i>7:35,<a href="http://localhost/tsng15/daily.php?&year=2010&month=5&day=12&proj_id=0"><i>12-May</i></a></i></font></td> <td class="calendar_cell_middle" nowrap="nowrap" align="right">14h 0m<font color="#909090"><i> of 6h 35m</i></font></td> <td class="calendar_cell_disabled_right" nowrap="nowrap" align="right"> <a href="http://localhost/tsng15/edit.php?client_id=0&proj_id=0&task_id=0&trans_num=33&year=2010&month=5&day=11" class="action_link">Details</a>, <a href="javascript:delete_entry(33);" class="action_link">Delete</a> </td> </tr> <tr class="diff"> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('client_info.php?client_id=3','Client Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=500,height=200')">Lazarus Household</a></td> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('proj_info.php?proj_id=4','Project Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=500,height=200')">Update Ubuntu</a></td> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('task_info.php?task_id=62','Task Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=300,height=150')">Application Development</a></td> <td class="calendar_cell_middle" nowrap="nowrap" align="right">10:00</td> <td class="calendar_cell_middle" nowrap="nowrap" align="right"><font color="#909090"><i>8:21,<a href="http://localhost/tsng15/daily.php?&year=2010&month=5&day=12&proj_id=0"><i>12-May</i></a></i></font></td> <td class="calendar_cell_middle" nowrap="nowrap" align="right">14h 0m<font color="#909090"><i> of 7h 21m</i></font></td> <td class="calendar_cell_disabled_right" nowrap="nowrap" align="right"> <a href="http://localhost/tsng15/edit.php?client_id=0&proj_id=0&task_id=0&trans_num=34&year=2010&month=5&day=11" class="action_link">Details</a>, <a href="javascript:delete_entry(34);" class="action_link">Delete</a> </td> </tr> <tr> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('client_info.php?client_id=3','Client Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=500,height=200')">Lazarus Household</a></td> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('proj_info.php?proj_id=4','Project Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=500,height=200')">Update Ubuntu</a></td> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('task_info.php?task_id=62','Task Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=300,height=150')">Application Development</a></td> <td class="calendar_cell_middle" nowrap="nowrap" align="right">16:25</td> <td class="calendar_cell_middle" nowrap="nowrap" align="right"><font color="#909090"><i>7:33,<a href="http://localhost/tsng15/daily.php?&year=2010&month=5&day=12&proj_id=0"><i>12-May</i></a></i></font></td> <td class="calendar_cell_middle" nowrap="nowrap" align="right">7h 35m<font color="#909090"><i> of 0h 8m</i></font></td> <td class="calendar_cell_disabled_right" nowrap="nowrap" align="right"> <a href="http://localhost/tsng15/edit.php?client_id=0&proj_id=0&task_id=0&trans_num=31&year=2010&month=5&day=11" class="action_link">Details</a>, <a href="javascript:delete_entry(31);" class="action_link">Delete</a> </td> </tr> <tr class="diff"> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('client_info.php?client_id=3','Client Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=500,height=200')">Lazarus Household</a></td> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('proj_info.php?proj_id=4','Project Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=500,height=200')">Update Ubuntu</a></td> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('task_info.php?task_id=62','Task Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=300,height=150')">Application Development</a></td> <td class="calendar_cell_middle" nowrap="nowrap" align="right">16:32</td> <td class="calendar_cell_middle" nowrap="nowrap" align="right"><font color="#909090"><i>7:35,<a href="http://localhost/tsng15/daily.php?&year=2010&month=5&day=12&proj_id=0"><i>12-May</i></a></i></font></td> <td class="calendar_cell_middle" nowrap="nowrap" align="right">7h 28m<font color="#909090"><i> of 0h 3m</i></font></td> <td class="calendar_cell_disabled_right" nowrap="nowrap" align="right"> <a href="http://localhost/tsng15/edit.php?client_id=0&proj_id=0&task_id=0&trans_num=30&year=2010&month=5&day=11" class="action_link">Details</a>, <a href="javascript:delete_entry(30);" class="action_link">Delete</a> </td> </tr> <tr> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('client_info.php?client_id=3','Client Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=500,height=200')">Lazarus Household</a></td> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('proj_info.php?proj_id=4','Project Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=500,height=200')">Update Ubuntu</a></td> <td class="calendar_cell_middle"><a href="javascript:void(0)" onclick="javascript:window.open('task_info.php?task_id=62','Task Info','location=0,directories=no,status=no,scrollbar=yes,menubar=no,resizable=1,width=300,height=150')">Application Development</a></td> <td class="calendar_cell_middle" nowrap="nowrap" align="right">16:34</td> <td class="calendar_cell_middle" nowrap="nowrap" align="right"><font color="#909090"><i>8:00,<a href="http://localhost/tsng15/daily.php?&year=2010&month=5&day=12&proj_id=0"><i>12-May</i></a></i></font></td> <td class="calendar_cell_middle" nowrap="nowrap" align="right">7h 26m<font color="#909090"><i> of 0h 26m</i></font></td> </tr> </tbody> </table> <br> <br> On 05/11/2010 01:20 AM, Scott Miller wrote: <blockquote cite="mid:046...@pt..." type="cite"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="Generator" content="Microsoft Word 11 (filtered medium)"> <!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--> <style> <!-- /* Font Definitions */ @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:blue; text-decoration:underline;} p {mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; font-size:12.0pt; font-family:"Times New Roman";} span.EmailStyle18 {mso-style-type:personal-reply; font-family:Arial; color:navy;} @page Section1 {size:8.5in 11.0in; margin:.7in .35in .7in .35in;} div.Section1 {page:Section1;} --> </style> <div class="Section1"> <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">In the forum at SourceForge, Peter Lazarus has reported the following:<o:p></o:p></span></font></p> <p class="MsoNormal" style="margin-left: 0.5in;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">2010-05-09 22:44:37 CDT<o:p></o:p></span></font></p> <p class="MsoNormal" style="margin-left: 0.5in;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">I have tried the 1.5 and found something odd about the times entered into the system by the clock on/clock off process. When I started at 10am and ended at 1pm, the end time for that task appears as 4am the next day, and the duration is shown as 14hours. I set a clockon/off time for the default task, clocking on at 1am and off at 2am. The duration shows 1 hour correctly, but the end time is 5pm. Under config, the timezone is set to Australia/Melbourne, but no locale is set. So I just now in configuration changed locale to en_AU, with no change to the results. My system clock is UTC. My php.ini doesn't have intl.default_locale set, but does have date.timezone set.<o:p></o:p></span></font></p> <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p> <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">I have attempted to replicate the problem. My TSNG config has been set to US/Central, the php.ini file had the date.timezone setting commented out. I tried changing the php.ini setting to US/Central, restarted apache, but the dates/times entered via the clockon/off process were set as expected in the database, and then read correctly when the page was reloaded. I then tried changing the php.ini to something completely different, “Europe/Zurich”, with no difference in date storage or retrieval.<o:p></o:p></span></font></p> <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p> <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Since I was unable to replicate your problem, allow me to speculate where your problem may lie. MySQL has the capability to attempt to convert dates/times automatically for you, and php can be configured to attempt to automatically convert dates/times when communicating with MySQL. I would have to guess your problem lies either with the MySQL configuration, or within the communications between MySQL and PHP.<o:p></o:p></span></font></p> <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p> <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">-Scott</span></font></p> </div> <br> </blockquote> </body> </html> |