Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
e698452f
Commit
e698452f
authored
Nov 01, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 358703: WebService functions version and timezone should follow bugzilla standard
Patch By Mads Bondo Dydensborg <mbd@dbc.dk> r=mkanat, a=myk
parent
d8370a5a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
14 deletions
+50
-14
Bugzilla.pm
Bugzilla/WebService/Bugzilla.pm
+38
-13
bz_webservice_demo.pl
contrib/bz_webservice_demo.pl
+12
-1
No files found.
Bugzilla/WebService/Bugzilla.pm
View file @
e698452f
...
...
@@ -14,24 +14,26 @@
#
# Contributor(s): Marc Schumann <wurblzap@gmail.com>
# Max Kanat-Alexander <mkanat@bugzilla.org>
# Mads Bondo Dydensborg <mbd@dbc.dk>
package
Bugzilla::WebService::
Bugzilla
;
use
strict
;
use
base
qw(Bugzilla::WebService)
;
use
Bugzilla::
Constants
;
import
SOAP::
Data
qw(type)
;
use
Time::
Zone
;
sub
version
{
return
BUGZILLA_VERSION
;
return
{
version
=>
type
(
'string'
)
->
value
(
BUGZILLA_VERSION
)
}
;
}
sub
timezone
{
my
$offset
=
tz_offset
();
$offset
=
((
$offset
/ 60) /
60
)
*
100
;
$offset
=
sprintf
(
'%+05d'
,
$offset
);
return
$offset
;
return
{
timezone
=>
type
(
'string'
)
->
value
(
$offset
)
}
;
}
1
;
...
...
@@ -42,11 +44,6 @@ __END__
Bugzilla::WebService::Bugzilla - Global functions for the webservice interface.
=head1 SYNOPSIS
my $version = Bugzilla.version;
my $tz = Bugzilla.timezone;
=head1 DESCRIPTION
This provides functions that tell you about Bugzilla in general.
...
...
@@ -58,14 +55,42 @@ and B<EXPERIMENTAL> mean.
=over
=item C<version>
=item C<version> B<EXPERIMENTAL>
=over
=item B<Description>
Returns the current version of Bugzilla
, as a string
.
Returns the current version of Bugzilla.
=item C<timezone>
=item B<Params> (none)
=item B<Returns>
A hash with a single item, C<version>, that is the version as a
string.
=item B<Errors> (none)
=back
Returns the timezone of the server Bugzilla is running on, in (+/-)XXXX
(RFC 2822) format. This is important because all dates/times that the
webservice interface returns will be in this timezone.
=item C<timezone> B<EXPERIMENTAL>
=over
=item B<Description>
Returns the timezone of the server Bugzilla is running on. This is
important because all dates/times that the webservice interface
returns will be in this timezone.
=item B<Params> (none)
=item B<Returns>
A hash with a single item, C<timezone>, that is the timezone as a
string in (+/-)XXXX (RFC 2822) format.
=back
=back
contrib/bz_webservice_demo.pl
View file @
e698452f
...
...
@@ -14,6 +14,7 @@
# The Original Code is the Bugzilla Bug Tracking System.
#
# Contributor(s): Marc Schumann <wurblzap@gmail.com>
# Mads Bondo Dydensborg <mbd@dbc.dk>
=head1 NAME
...
...
@@ -145,7 +146,17 @@ minimum required version your application needs.
$soapresult
=
$proxy
->
call
(
'Bugzilla.version'
);
_die_on_fault
(
$soapresult
);
print
'Connecting to a Bugzilla of version '
.
$soapresult
->
result
()
.
".\n"
;
print
'Connecting to a Bugzilla of version '
.
$soapresult
->
result
()
->
{
version
}
.
".\n"
;
=head2 Checking Bugzilla's timezone
To make sure that you understand the dates and times that Bugzilla returns to you, you may want to call C<Bugzilla.timezone>.
=cut
$soapresult
=
$proxy
->
call
(
'Bugzilla.timezone'
);
_die_on_fault
(
$soapresult
);
print
'Bugzilla\'s timezone is '
.
$soapresult
->
result
()
->
{
timezone
}
.
".\n"
;
=head2 Logging In and Out
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment