Bug 137252 - EWS bubble hover shows wrong timestamps
Summary: EWS bubble hover shows wrong timestamps
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Csaba Osztrogonác
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-30 06:56 PDT by Csaba Osztrogonác
Modified: 2014-10-06 09:16 PDT (History)
4 users (show)

See Also:


Attachments
snapshot (48.41 KB, image/jpeg)
2014-09-30 06:56 PDT, Csaba Osztrogonác
no flags Details
Patch (1.38 KB, patch)
2014-09-30 08:31 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
Patch for landing (2.32 KB, patch)
2014-10-06 06:52 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2014-09-30 06:56:40 PDT
Created attachment 238924 [details]
snapshot

for example in bug137244

attachment date: 2014-09-30 06:16 PST --> 15:16 in CEST (GMT+2)

But the style checker (and the others too) bubble says it finished 
the patch at 13:18:18 GMT+2, 2 hours before submitting the patch.
Comment 1 Csaba Osztrogonác 2014-09-30 07:21:34 PDT
I ran into this bug with latest Firefox, but the time seems
to be valid with Safari and Chrome.

The problem is that the time is converted to local time
with this JS code: new Date("2014-09-30T13:18:18.902015").toString()

But the trailing "Z" or "+00:00" is missing to indicate that the time 
is in UTC/GMT. Can we add "Z" to the datetime string somehow?
Comment 2 Csaba Osztrogonác 2014-09-30 08:04:46 PDT
ECMA 262 stated clearly in "15.9.1.15 Date Time String Format" the following:
The value of an absent time zone offset is “Z”.

So it is an ugly bug in FF and IE too. :-/

But why not add the trailing "Z" if we can make the bad boys happy too.
Comment 3 Csaba Osztrogonác 2014-09-30 08:08:10 PDT
(In reply to comment #2)
> ECMA 262 stated clearly in "15.9.1.15 Date Time String Format" the following:
> The value of an absent time zone offset is “Z”.
> 
> So it is an ugly bug in FF and IE too. :-/
> 
> But why not add the trailing "Z" if we can make the bad boys happy too.

But the ES6 will change the behaviour: "If the time zone offset is absent, the date-time is interpreted as a local time."

So +1 to use "Z", because this time is in UTC and it will work with ES5 and ES6 too.
Comment 4 Csaba Osztrogonác 2014-09-30 08:31:29 PDT
Created attachment 238926 [details]
Patch
Comment 5 Alexey Proskuryakov 2014-09-30 10:08:37 PDT
Comment on attachment 238926 [details]
Patch

Looks like this is not the most pythonic way to fix this - the right one is to use pytz package and replace(tzinfo=simple_utc()). But this is simpler and faster, so why not.

Please make the same change in queuestatusjson.py before landing. Ping me when landed, so that I could deploy.
Comment 6 Alexey Proskuryakov 2014-10-04 16:58:45 PDT
Ossy, will you have a chance to look into this further?
Comment 7 Csaba Osztrogonác 2014-10-06 06:52:30 PDT
Created attachment 239336 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2014-10-06 07:35:04 PDT
Comment on attachment 239336 [details]
Patch for landing

Clearing flags on attachment: 239336

Committed r174343: <http://trac.webkit.org/changeset/174343>
Comment 9 WebKit Commit Bot 2014-10-06 07:35:08 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Alexey Proskuryakov 2014-10-06 09:16:50 PDT
Deployed.