diff options
author | mkanat%bugzilla.org <> | 2006-11-15 04:10:52 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-11-15 04:10:52 +0100 |
commit | 19588703fd07642a4341f283212a9eef70cbd828 (patch) | |
tree | 54d42c3c5f46624a661261a2de0856065e820d14 /Bugzilla/WebService.pm | |
parent | d57079f4b474151515c6c5d298a3ed559943115e (diff) | |
download | bugzilla-19588703fd07642a4341f283212a9eef70cbd828.tar.gz bugzilla-19588703fd07642a4341f283212a9eef70cbd828.tar.xz |
Bug 349256: Make the webservice get_bug into a stable API
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=mbd, a=justdave
Diffstat (limited to 'Bugzilla/WebService.pm')
-rwxr-xr-x | Bugzilla/WebService.pm | 13 |
1 files changed, 13 insertions, 0 deletions
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; |