Bug 1356909

Summary: Tooltip of Sparkline shows wrong time (UTC TimeZone)
Product: [oVirt] ovirt-engine-dashboard Reporter: Pavel Stehlik <pstehlik>
Component: CoreAssignee: Scott Dickerson <sdickers>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Novotny <pnovotny>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: awels, bugs, mgoldboi, oourfali, pnovotny, pstehlik
Target Milestone: ovirt-4.0.6Keywords: Reopened
Target Release: 1.0.6Flags: rule-engine: ovirt-4.0.z+
mgoldboi: planning_ack+
oourfali: devel_ack+
pstehlik: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-18 07:27:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: UX RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
time-zone.png
none
dashboard time zone fix none

Description Pavel Stehlik 2016-07-15 09:14:56 UTC
Created attachment 1180078 [details]
time-zone.png

Description of problem:
 Although the top line of Dashboard shows correct time " Last Updated 7/15/2016 11:04:56 AM", sparkline tooltips shows different TimeZone (UTC). 


Version-Release number of selected component (if applicable):
ovirt-engine-dashboard-1.0.0-20160705git3e1e994.el7ev

How reproducible:
100%

Steps to Reproduce:
1. use different timezone instead UTC
2. show tooltip on above any sparkline (MEM,CPU,Storage)
3.

Actual results:
 Time is in UTC only

Expected results:
 Both times same in current TZ.

Additional info:
 See at pic.

Comment 4 Alexander Wels 2016-07-21 17:07:10 UTC
Closing as works for me, I have tried on several different environments with different timezones and different browsers, and they all worked correctly. If you can reproduce and give me access to the system, please re-open.

Comment 5 Pavel Stehlik 2016-08-04 19:58:14 UTC
Reproduced also on ovirt-engine-dashboard-1.0.2-1.el7ev.x86_64.

Comment 6 Alexander Wels 2016-08-04 20:40:21 UTC
So the problem appears to be unrelated to the timezone, but related to how we get the data. Due to the way the DWH works, the 'hours' table doesn't contain the last two hours of aggregated data. However the samples table does contain that data. In order to get the complete timeline, we select stuff from the hours table and union that with the samples table. If there are no 'samples' available that union will return just the data from the hours table which will be 2 hours short.

I will have to think about how to solve that particular issue.

Comment 7 Scott Dickerson 2016-11-20 16:35:06 UTC
BZ 1362402 reconfigured the date and time formatting on the dashboard so it is a consistent UTC time zone.  Based on Alex's comment 6, I'm not sure that is enough to fix this BZ.

Alex - do you think there is something deeper in the collection or query code that needs to be addressed?

Comment 8 Alexander Wels 2016-11-21 13:12:14 UTC
IIRC there was an issue with one of the queries, but we always send the data over in epochs, so time zone independent. Well technically dependent on the timezone of the server. But honestly don't know what else we can do. I say we mark it fixed and let QA figure out if we fixed it as I still don't have a clear picture of the cause.

Comment 9 Scott Dickerson 2016-11-21 14:16:53 UTC
Sounds reasonable.  I roll up this BZ with BZ 1362402 and take it from there.

Comment 10 Pavel Novotny 2016-12-14 17:43:52 UTC
Verified in 
rhevm-4.0.6.3-0.1.el7ev.noarch
ovirt-engine-dashboard-1.0.6-1.el7ev.x86_64

(To clarify a bit) after talking to Pavel Stehlik (BZ reporter), the problems here were:
1. Time zone was not reported in sparkline and in the "Last Updated" time.
2. There was some difference (1 or 2 hours IIRC) between the time in "Last Updated" and the time in the last sparkline item (which is the time of the last hourly aggregation taken from DWH). In combination with 1. it was causing confusion.

This is fixed now.
1. The time is rendered with a time zone (GMT), e.g., "12/14/2016, 1:03:05 PM GMT".
2. No difference in hours between the last sparkline item and "Last Updated" time.
See the screenshot attached for details.

Comment 11 Pavel Novotny 2016-12-14 17:44:35 UTC
Created attachment 1231824 [details]
dashboard time zone fix