Commit 0e4b2ce5 authored by ghendricks%novell.com's avatar ghendricks%novell.com

Bug 486006 - importxml.pl must not use format_time() for deadlines

patch by ghendricks r=LpSolit a=LpSolit
parent 114db9a8
...@@ -445,8 +445,10 @@ sub format_time { ...@@ -445,8 +445,10 @@ sub format_time {
hour => $time[2], hour => $time[2],
minute => $time[1], minute => $time[1],
second => $time[0], second => $time[0],
# Use the timezone specified by the server. # If importing, use the specified timezone, otherwise
time_zone => Bugzilla->local_timezone}); # use the timezone specified by the server.
time_zone => Bugzilla->local_timezone->offset_as_string($time[6])
|| Bugzilla->local_timezone});
# Now display the date using the given timezone, # Now display the date using the given timezone,
# or the user's timezone if none is given. # or the user's timezone if none is given.
......
...@@ -87,7 +87,6 @@ use Bugzilla::Status; ...@@ -87,7 +87,6 @@ use Bugzilla::Status;
use MIME::Base64; use MIME::Base64;
use MIME::Parser; use MIME::Parser;
use Date::Format;
use Getopt::Long; use Getopt::Long;
use Pod::Usage; use Pod::Usage;
use XML::Twig; use XML::Twig;
...@@ -803,8 +802,7 @@ sub process_bug { ...@@ -803,8 +802,7 @@ sub process_bug {
# Process time fields # Process time fields
if ( $params->{"timetrackinggroup"} ) { if ( $params->{"timetrackinggroup"} ) {
my $date = format_time( $bug_fields{'deadline'}, "%Y-%m-%d" ) my $date = validate_date( $bug_fields{'deadline'} ) ? $bug_fields{'deadline'} : undef;
|| undef;
push( @values, $date ); push( @values, $date );
push( @query, "deadline" ); push( @query, "deadline" );
if ( defined $bug_fields{'estimated_time'} ) { if ( defined $bug_fields{'estimated_time'} ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment