REST BzAPI sometimes returns dates in the future (possibly only for history items)

RESOLVED FIXED

Status

--
major
RESOLVED FIXED
8 years ago
2 months ago

People

(Reporter: christian, Assigned: gerv)

Tracking

Details

(Reporter)

Description

8 years ago
Compare:

    https://bugzilla.mozilla.org/show_activity.cgi?id=415086

and 

    https://api-dev.bugzilla.mozilla.org/latest/bug/415086/history

The first one has mnot added to the cc at:

    2010-07-13 17:36:36 PDT

and the second one has mnot added to the cc at:

    change_time: 2010-07-14T07:36:36Z

(which is in the future btw).
Ah, this would be me not correctly taking into account the fact that the XML-RPC API, on which history is based, now returns all times in UTC. I will look into this. In the mean time, you may have to work out what's going on (there will be a constant offset of some sort, I suspect) and adjust accordingly temporarily.

Gerv
(Reporter)

Comment 2

8 years ago
Looks like I need to subtract 14:00:00 from the datetime to get the proper times
(Reporter)

Comment 3

8 years ago
Hmmm, that doesn't work for all cases (2010-07-15T21:20:05Z
 vs 2010-07-16T04:20:05Z for bug 578779, the difference is 7 hours)
(Reporter)

Comment 4

8 years ago
Ok, this is weird but I think I know what is going on. It looks like the "last_change_time" field is +7 hours while the timestamps for the changes are +14 hours.
OK, the test suite now passes against Bugzilla 3.6, having fixed some timezone-related issues. So all times should now be correct. Look for this change in the next BzAPI release.

Gerv
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
(Reporter)

Updated

8 years ago
Blocks: 610473

Updated

2 months ago
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.