diff options
author | Mark Wells <mark@freeside.biz> | 2012-10-30 12:16:13 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2012-10-30 12:16:13 -0700 |
commit | d77fe06b27410a41855e1425114ab8d9cdae4ff0 (patch) | |
tree | b7f167d2623f2559d75c3af6f030e9e469e1e772 /FS | |
parent | dbae615569712c6f392dfd6cc1930f9d93340e31 (diff) |
fix ticket display, fallout from #17067
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Misc/DateTime.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/FS/FS/Misc/DateTime.pm b/FS/FS/Misc/DateTime.pm index e36f3a95a..9c12e6408 100644 --- a/FS/FS/Misc/DateTime.pm +++ b/FS/FS/Misc/DateTime.pm @@ -32,13 +32,14 @@ the date as an integer UNIX timestamp. sub parse_datetime { my $string = shift; return '' unless $string =~ /\S/; + my $tz = shift || 'local'; my $conf = new FS::Conf; my $format = $conf->config('date_format') || '%m/%d/%Y'; if ( $format eq '%d/%m/%Y' ) { # =~ /\%d.*\%m/ ) { #$format =~ s/\%//g; - my $parser = DateTime::Format::Natural->new( 'time_zone' => 'local', + my $parser = DateTime::Format::Natural->new( 'time_zone' => $tz, #'format'=>'d/m/y',#lc($format) ); $dt = $parser->parse_datetime($string); @@ -51,7 +52,7 @@ sub parse_datetime { $dt->epoch; } } else { - return str2time($string); + return str2time($string, $tz); } } |