View | Details | Raw Unified | Return to bug 13242
Collapse All | Expand All

(-)a/Koha/DateUtils.pm (-2 / +7 lines)
Lines 53-58 to the system preferences. If the date string is empty DateTime->now is returned Link Here
53
53
54
sub dt_from_string {
54
sub dt_from_string {
55
    my ( $date_string, $date_format, $tz ) = @_;
55
    my ( $date_string, $date_format, $tz ) = @_;
56
57
    # FIXME: see bug 13242 => no TZ for dates 'infinite'
58
    return DateTime::Format::DateParse->parse_datetime($date_string)
59
        if $date_string =~ /^9999-/;
60
56
    if ( !$tz ) {
61
    if ( !$tz ) {
57
        $tz = C4::Context->tz;
62
        $tz = C4::Context->tz;
58
    }
63
    }
Lines 123-129 sub output_pref { Link Here
123
128
124
    return unless defined $dt;
129
    return unless defined $dt;
125
130
126
    $dt->set_time_zone( C4::Context->tz );
131
    # FIXME: see bug 13242 => no TZ for dates 'infinite'
132
    $dt->set_time_zone( C4::Context->tz ) if $dt->ymd !~ /^9999/;
127
133
128
    my $pref =
134
    my $pref =
129
      defined $force_pref ? $force_pref : C4::Context->preference('dateformat');
135
      defined $force_pref ? $force_pref : C4::Context->preference('dateformat');
130
- 

Return to bug 13242