Bugfix for invalid date with dd/mm/yyyy pattern

English! place to talk about development, programming and coding
Post Reply
danielbathke
Znuny newbie
Posts: 7
Joined: 11 Apr 2013, 18:44
Znuny Version: 3.2.2

Bugfix for invalid date with dd/mm/yyyy pattern

Post by danielbathke »

Please consider adding this bugfix. It cause invalid date errors on log on locales that uses dd/mm/yyyy pattern for datestyle.

File Kernel/System/Time.pm:318, inside method TimeStamp2SystemTime (on version 3.2.2):

Code: Select all

    # match BR date format
    elsif ( $Param{String} =~ /(\d{1,2})\/(\d{1,2})\/(\d{4})\s(\d{1,2}):(\d{1,2}):(\d{1,2})/ ) { 
        $SytemTime = $Self->Date2SystemTime(
            Year   => $3, 
            Month  => $2, 
            Day    => $1, 
            Hour   => $4, 
            Minute => $5, 
            Second => $6, 
        );  
    }
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Bugfix for invalid date with dd/mm/yyyy pattern

Post by jojo »

Please open a bug via http://bugs.otrs.org including your fix
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Post Reply