Closed Bug 581190 Opened 14 years ago Closed 10 years ago

new_since on Bug.comments call broken with respect to timezones

Categories

(Webtools Graveyard :: BzAPI, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gerv, Assigned: gerv)

Details

The new_since parameter on the XML-RPC call for comments is broken with respect to timezones. In Bugzilla::WebService::Bug->comments(), it gets turned into an "after" parameter to Bug->comments(): my $comments = $bug->comments({ order => 'oldest_to_newest', after => $params->{new_since} }); In Bugzilla::Bug::comments(), that parameter gets interpreted by Bugzilla::Util::datetime_from(): my $from = datetime_from($params->{after}); datetime_from() uses the Bugzilla local timezone, rather than UTC, if no timezone is given. # If a timezone was specified, use it. Otherwise, use the # local timezone. time_zone => Bugzilla->local_timezone->offset_as_string($time[6]) || Bugzilla->local_timezone, So new_since is interpreted in the local timezone rather than UTC. As of 3.6, I believe the intention is that the API send and receive all times in UTC. Gerv
Actually, I don't see a bug there. new_since will be properly converted to a date in the local timezone by Bugzilla::WebService::Server, as long as it is sent as a dateTime.iso8601 field and not a string. I suspect you are sending it as a string?
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Ah. <sigh> Yes, I am. Back to filing that bug on BZ::Client... Gerv
Assignee: webservice → gerv
Status: RESOLVED → REOPENED
Component: WebService → BzAPI
Product: Bugzilla → Webtools
QA Contact: default-qa → bzapi
Resolution: WORKSFORME → ---
Version: 4.1 → Trunk
BzAPI is very much in maintenance mode and is being superseded by the BzAPI shim on top of the native Bugzilla REST API, and that native API itself. So this bug is not going to be fixed. Gerv
Status: REOPENED → RESOLVED
Closed: 14 years ago10 years ago
Resolution: --- → WONTFIX
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.