Bug 1356909 - Tooltip of Sparkline shows wrong time (UTC TimeZone)
Summary: Tooltip of Sparkline shows wrong time (UTC TimeZone)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine-dashboard
Classification: oVirt
Component: Core
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.0.6
: 1.0.6
Assignee: Scott Dickerson
QA Contact: Pavel Novotny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-15 09:14 UTC by Pavel Stehlik
Modified: 2017-01-18 07:27 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-01-18 07:27:59 UTC
oVirt Team: UX
Embargoed:
rule-engine: ovirt-4.0.z+
mgoldboi: planning_ack+
oourfali: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)
time-zone.png (29.99 KB, image/png)
2016-07-15 09:14 UTC, Pavel Stehlik
no flags Details
dashboard time zone fix (41.06 KB, image/png)
2016-12-14 17:44 UTC, Pavel Novotny
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 67078 0 master MERGED Convert intl.js Date/Time formatting to ECMA-402 Intl API with UTC TZ 2016-11-22 23:32:15 UTC
oVirt gerrit 67192 0 ovirt-engine-dashboard-1.0 MERGED Convert intl.js Date/Time formatting to ECMA-402 Intl API with UTC TZ 2016-11-23 00:06:55 UTC

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


Note You need to log in before you can comment on or make changes to this bug.