Bug 161620 - Time Zone discrepancy in Log View for Java XML Logging File
Summary: Time Zone discrepancy in Log View for Java XML Logging File
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Liz Dancy CLA
QA Contact:
URL:
Whiteboard: closed460
Keywords: plan
Depends on:
Blocks:
 
Reported: 2006-10-19 14:31 EDT by Liz Dancy CLA
Modified: 2016-05-05 10:51 EDT (History)
2 users (show)

See Also:


Attachments
Java XML Logging File (571.04 KB, application/octet-stream)
2006-10-23 10:57 EDT, Liz Dancy CLA
no flags Details
Patch adding time zone info in UML (1.64 KB, patch)
2006-10-23 16:16 EDT, Liz Dancy CLA
no flags Details | Diff
Patch which synchronizes time zones between views (10.01 KB, patch)
2007-03-13 11:53 EDT, Liz Dancy CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Liz Dancy CLA 2006-10-19 14:31:42 EDT
Test case failure (Platform.UI.LogView test: Correlation1_W2K). After opening the Java XML logging file in CVS under org.eclipse.tptp.monitoring.tests\gui\Common.Resources\java-xml.log
and creating a time based correlation in the Log Interactions View as per the test case, the first record in the Log Interactions view shows a creation time of 3:14:23 PM but in the Log View it is displayed as 7:14:23 PM as well as in the Properties View. This is likely a time zone problem due to the offset of 4 hours. In all of the other log types the creation types are the same between the two views.
Comment 1 Liz Dancy CLA 2006-10-19 15:12:12 EDT
Setting to P1, expecting to have this fixed for 4.3 i3.
Comment 2 Liz Dancy CLA 2006-10-23 10:44:05 EDT
After inspecting the file, this is actually a problem in the Log View. The correct creation time is 3:14:23 PM (which is what is being displayed in the Log Interactions View and not the Log View). Changed defect summary to reflect this.
Comment 3 Alex Nan CLA 2006-10-23 10:51:24 EDT
Liz can you do me a favor and attach the log file to this defect, I would like to take look to this problem too.
Comment 4 Liz Dancy CLA 2006-10-23 10:57:35 EDT
Created attachment 52515 [details]
Java XML Logging File

Sure, I have attached the log file I used to produce the defect above.
Comment 5 Alex Nan CLA 2006-10-23 14:55:41 EDT
Liz, as discussed the problem is not in the log view, the time difference is indeed because of the fact that the log view is using GMT to format the time stamp while the Log interactions view is using the system time zone. The code that formats the log graph node time is in the org.eclipse.hyades.uml2sd.ui.view.SDWidget class, so a solution would be to display the time zone in the formatted time stamp in the log interactions view. But this change will affect all the views that build on top of the sequence diagram view.
Comment 6 Liz Dancy CLA 2006-10-23 16:16:47 EDT
Created attachment 52557 [details]
Patch adding time zone info in UML

I have attached a patch adding this time zone info to the Log Interactions View and subsequently to all other UML diagrams where the timestamp is displayed.
Comment 7 Liz Dancy CLA 2006-10-30 10:41:20 EST
Re-targeting to 4.4 as additions to the proposed patch are being considered.
Comment 8 Liz Dancy CLA 2007-01-11 18:01:24 EST
Alex or Eugene, could you review and check this in if appropriate.
Comment 9 Alex Nan CLA 2007-01-11 18:20:22 EST
I have reviewed it Liz, and discussed the matter also with Eugene because after giving some more thought I realised the proposed solution was not the best alternative. I believe we have to revisit the fix. We shouldn't add the time zone in the label of the sequence diagram but rather also provide the time zone in the LogGraphNode so that the log interactions view is using the same time zone as the log view. For this we need unfortunately to create a new API class ITimeRange2 that provides a setter and getter for the time zone of firstTime, lastTime. LogGraphNode would then implement ITimeRange2. The LogGraphNode would either return the normalized time zone set in the log viewer preferences or if no preference is set, the time zone of the CBE associated to the LogGraphNode. This way we avoid changing the time format.
How does this solution sound?
Comment 10 Liz Dancy CLA 2007-03-13 11:53:43 EDT
Created attachment 60682 [details]
Patch which synchronizes time zones between views

I have attached a patch which implements Alex's suggestion above.  You will need the current monitoring.la.core and platform.la.core plugins to review this patch (from recent fix of 176999). Also, defect 164354 affects the scrollbar. Please review when you have the time. This is an API change so it needs to get in before Friday, March 16.
Comment 11 Liz Dancy CLA 2007-03-15 08:30:56 EDT
Patch was reviewed and checked in. Thanks Alex.
Comment 12 Paul Slauenwhite CLA 2009-06-30 10:28:29 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since the originator of this enhancement/defect has an inactive Bugzilla account and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.