aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorghendricks%novell.com <>2009-04-10 22:29:58 +0000
committerghendricks%novell.com <>2009-04-10 22:29:58 +0000
commit0e4b2ce5a8e14a95d0eac6776731bcb37fec2741 (patch)
tree5e373275b91b4822feb1ba79f6f671ca045c0692
parent114db9a8388cfda7f293a2ac3354ad39818f3488 (diff)
downloadbugs-0e4b2ce5a8e14a95d0eac6776731bcb37fec2741.tar
bugs-0e4b2ce5a8e14a95d0eac6776731bcb37fec2741.tar.gz
bugs-0e4b2ce5a8e14a95d0eac6776731bcb37fec2741.tar.bz2
bugs-0e4b2ce5a8e14a95d0eac6776731bcb37fec2741.tar.xz
bugs-0e4b2ce5a8e14a95d0eac6776731bcb37fec2741.zip
Bug 486006 - importxml.pl must not use format_time() for deadlines
patch by ghendricks r=LpSolit a=LpSolit
-rw-r--r--Bugzilla/Util.pm6
-rwxr-xr-ximportxml.pl4
2 files changed, 5 insertions, 5 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index 7ed20c875..a725a8e21 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -445,8 +445,10 @@ sub format_time {
hour => $time[2],
minute => $time[1],
second => $time[0],
- # Use the timezone specified by the server.
- time_zone => Bugzilla->local_timezone});
+ # If importing, use the specified timezone, otherwise
+ # 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,
# or the user's timezone if none is given.
diff --git a/importxml.pl b/importxml.pl
index 0a6aefe45..bd4aee186 100755
--- a/importxml.pl
+++ b/importxml.pl
@@ -87,7 +87,6 @@ use Bugzilla::Status;
use MIME::Base64;
use MIME::Parser;
-use Date::Format;
use Getopt::Long;
use Pod::Usage;
use XML::Twig;
@@ -803,8 +802,7 @@ sub process_bug {
# Process time fields
if ( $params->{"timetrackinggroup"} ) {
- my $date = format_time( $bug_fields{'deadline'}, "%Y-%m-%d" )
- || undef;
+ my $date = validate_date( $bug_fields{'deadline'} ) ? $bug_fields{'deadline'} : undef;
push( @values, $date );
push( @query, "deadline" );
if ( defined $bug_fields{'estimated_time'} ) {