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
96d709ed
Commit
96d709ed
authored
Sep 29, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 573195: Make Bug.get return all of a bug's standard and custom field
information r=dkl, a=mkanat
parent
0aeaae04
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
Util.pm
Bugzilla/Util.pm
+12
-3
Bug.pm
Bugzilla/WebService/Bug.pm
+0
-0
Server.pm
Bugzilla/WebService/Server.pm
+2
-0
No files found.
Bugzilla/Util.pm
View file @
96d709ed
...
...
@@ -444,7 +444,7 @@ sub datetime_from {
# strptime() counts years from 1900, and months from 0 (January).
# We have to fix both values.
my
$dt
=
DateTime
->
new
({
my
%
args
=
(
year
=>
$time
[
5
]
+
1900
,
month
=>
$time
[
4
]
+
1
,
day
=>
$time
[
3
],
...
...
@@ -452,12 +452,21 @@ sub datetime_from {
minute
=>
$time
[
1
],
# DateTime doesn't like fractional seconds.
# Also, sometimes seconds are undef.
second
=>
int
(
$time
[
0
]
||
0
)
,
second
=>
defined
(
$time
[
0
])
?
int
(
$time
[
0
])
:
undef
,
# 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
,
});
);
# If something wasn't specified in the date, it's best to just not
# pass it to DateTime at all. (This is important for doing datetime_from
# on the deadline field, which is usually just a date with no time.)
foreach
my
$arg
(
keys
%
args
)
{
delete
$args
{
$arg
}
if
!
defined
$args
{
$arg
};
}
my
$dt
=
new
DateTime
(
\%
args
);
# Now display the date using the given timezone,
# or the user's timezone if none is given.
...
...
Bugzilla/WebService/Bug.pm
View file @
96d709ed
This diff is collapsed.
Click to expand it.
Bugzilla/WebService/Server.pm
View file @
96d709ed
...
...
@@ -43,6 +43,8 @@ sub datetime_format_inbound {
sub
datetime_format_outbound
{
my
(
$self
,
$date
)
=
@_
;
return
undef
if
(
!
defined
$date
or
$date
eq
''
);
my
$time
=
$date
;
if
(
blessed
(
$date
))
{
# We expect this to mean we were sent a datetime object
...
...
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