Closed Bug 578556 Opened 14 years ago Closed 14 years ago

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

Categories

(Webtools Graveyard :: BzAPI, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: christian, Assigned: gerv)

References

Details

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
Looks like I need to subtract 14:00:00 from the datetime to get the proper times
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)
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
Closed: 14 years ago
Resolution: --- → FIXED
Blocks: 610473
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.