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
65a9538e
Commit
65a9538e
authored
Sep 29, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 351178: WebService needs to be able to provide the server's timezone
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=wurblzap, a=myk
parent
e4a1df17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
1 deletion
+75
-1
WebService.pm
Bugzilla/WebService.pm
+30
-0
Bugzilla.pm
Bugzilla/WebService/Bugzilla.pm
+45
-1
No files found.
Bugzilla/WebService.pm
View file @
65a9538e
...
...
@@ -45,3 +45,33 @@ sub make_response {
}
1
;
__END__
=head1 NAME
Bugzilla::WebSerice - The Web Service interface to Bugzilla
=head1 DESCRIPTION
This is the standard API for external programs that want to interact
with Bugzilla. It provides various methods in various modules.
=head1 STABLE, EXPERIMENTAL, and UNSTABLE
Methods are marked B<STABLE> if you can expect their parameters and
return values not to change between versions of Bugzilla. You are
best off always using methods marked B<STABLE>. We may add parameters
and additional items to the return values, but your old code will
always continue to work with any new changes we make. If we ever break
a B<STABLE> interface, we'll post a big notice in the Release Notes,
and it will only happen during a major new release.
Methods (or parts of methods) are marked B<EXPERIMENTAL> if
we I<believe> they will be stable, but there's a slight chance that
small parts will change in the future.
Certain parts of a method's description may be marked as B<UNSTABLE>,
in which case those parts are not guaranteed to stay the same between
Bugzilla versions.
Bugzilla/WebService/Bugzilla.pm
View file @
65a9538e
...
...
@@ -13,6 +13,7 @@
# The Original Code is the Bugzilla Bug Tracking System.
#
# Contributor(s): Marc Schumann <wurblzap@gmail.com>
# Max Kanat-Alexander <mkanat@bugzilla.org>
package
Bugzilla::WebService::
Bugzilla
;
...
...
@@ -20,8 +21,51 @@ use strict;
use
base
qw(Bugzilla::WebService)
;
use
Bugzilla::
Constants
;
sub
get_version
{
use
Time::
Zone
;
sub
version
{
return
BUGZILLA_VERSION
;
}
sub
timezone
{
my
$offset
=
tz_offset
();
$offset
=
((
$offset
/ 60) /
60
)
*
100
;
$offset
=
sprintf
(
'%+05d'
,
$offset
);
return
'GMT'
.
$offset
;
}
1
;
__END__
=head1 NAME
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.
=head1 METHODS
See L<Bugzilla::WebService> for a description of what B<STABLE>, B<UNSTABLE>,
and B<EXPERIMENTAL> mean.
=over
=item C<version>
Returns the current version of Bugzilla, as a string.
=item C<timezone>
Returns the timezone of the server Bugzilla is running on, in GMT(+/-)XXXX
format. This is important because all dates/times that the webservice
interface returns will be in this timezone.
=back
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