summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-11-09 15:03:20 +0000
committerfukachan <fukachan>2001-11-09 15:03:20 +0000
commit7a17575aeb0a99b90ddf3ebddd289cf8b9205b18 (patch)
tree3fa01ee0b88a2dee20fd8004e69d96bedf8e295c
parentd400eb36c86ba9c8f1a5d5d1fb1f98bb16c139c6 (diff)
downloadfml8-7a17575aeb0a99b90ddf3ebddd289cf8b9205b18.tar.gz
fml8-7a17575aeb0a99b90ddf3ebddd289cf8b9205b18.tar.bz2
fml8-7a17575aeb0a99b90ddf3ebddd289cf8b9205b18.zip
validate $in $shift_m
-rw-r--r--fml/lib/Mail/Message/Date.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/fml/lib/Mail/Message/Date.pm b/fml/lib/Mail/Message/Date.pm
index 73265b6d..9c1f4598 100644
--- a/fml/lib/Mail/Message/Date.pm
+++ b/fml/lib/Mail/Message/Date.pm
@@ -2,7 +2,7 @@
#
# Copyright (C) 2000 Ken'ichi Fukamachi
#
-# $FML: Date.pm,v 1.9 2001/07/02 14:08:53 fukachan Exp $
+# $FML: Date.pm,v 1.1 2001/11/03 08:03:30 fukachan Exp $
#
package Mail::Message::Date;
@@ -251,6 +251,8 @@ sub date_to_unixtime
my (%month);
my ($zone);
+ $in =~ s/[\s\n]*$//;
+
require 'timelocal.pl';
# hints
@@ -349,6 +351,7 @@ sub date_to_unixtime
# get gmtime
$shift_t =~ s/^0*//;
$shift_m =~ s/^0*//;
+ $shift_m = 0 unless $shift_m;
$shift = $shift_t + ($shift_m/60);
$shift = ($pm eq '+' ? -1 : +1) * $shift;