From 19588703fd07642a4341f283212a9eef70cbd828 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Wed, 15 Nov 2006 03:10:52 +0000 Subject: Bug 349256: Make the webservice get_bug into a stable API Patch By Max Kanat-Alexander r=mbd, a=justdave --- Bugzilla/WebService.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Bugzilla/WebService.pm') diff --git a/Bugzilla/WebService.pm b/Bugzilla/WebService.pm index efe8258df..b38596f2a 100755 --- a/Bugzilla/WebService.pm +++ b/Bugzilla/WebService.pm @@ -19,6 +19,7 @@ package Bugzilla::WebService; use strict; use Bugzilla::WebService::Constants; +use Date::Parse; sub fail_unimplemented { my $this = shift; @@ -28,6 +29,18 @@ sub fail_unimplemented { ->faultstring('Service Unimplemented'); } +sub datetime_format { + my ($self, $date_string) = @_; + + my $time = str2time($date_string); + my ($sec, $min, $hour, $mday, $mon, $year) = localtime $time; + # This format string was stolen from SOAP::Utils->format_datetime, + # which doesn't work but which has almost the right format string. + my $iso_datetime = sprintf('%d%02d%02dT%02d:%02d:%02d', + $year + 1900, $mon + 1, $mday, $hour, $min, $sec); + return $iso_datetime; +} + package Bugzilla::WebService::XMLRPC::Transport::HTTP::CGI; use strict; -- cgit v1.2.3-24-g4f1b