Customer Location TimeZone

Hilfe zu OTRS Problemen aller Art
Post Reply
NancyL
Znuny expert
Posts: 247
Joined: 05 Aug 2014, 08:13
Znuny Version: 6.0.30
Real Name: Nancy

Customer Location TimeZone

Post by NancyL »

Guten Morgen,
ich habe ein Thema in OTRS Community 6.0.30:
wenn ich einen Kunden unter AdminCustomerCompany anlege der das Land Ungarn hat wird das Datumsformat wie folgt angelegt: '202119-1-19 07:15:54'
Was natürlich falsch ist. Im Apache Status erfolgt dann die Meldung:

Code: Select all

Jan 20 08:12:52 otrs-itsm-prod OTRS-CGI-25[32626]: [Error][Kernel::System::DateTime::new][Line:174]: Error creating DateTime object ( 'String' => '202119-1-19 07:15:54' ).
Jan 20 08:12:53 otrs-itsm-prod OTRS-CGI-25[32730]: [Error][Kernel::System::DateTime::_StringToHash][Line:1753]: Invalid date/time string 202119-1-19 07:15:54.
Jan 20 08:12:53 otrs-itsm-prod OTRS-CGI-25[32730]: [Error][Kernel::System::DateTime::_CPANDateTimeObjectCreate][Line:1812]: Invalid value for String: 202119-1-19 07:15:54.
Jan 20 08:12:53 otrs-itsm-prod OTRS-CGI-25[32730]: [Error][Kernel::System::DateTime::new][Line:174]: Error creating DateTime object ( 'String' => '202119-1-19 07:15:54' ).
Jan 20 08:12:54 otrs-itsm-prod OTRS-CGI-25[415]: [Error][Kernel::System::DateTime::_StringToHash][Line:1753]: Invalid date/time string 202119-1-19 07:15:54.
Jan 20 08:12:54 otrs-itsm-prod OTRS-CGI-25[415]: [Error][Kernel::System::DateTime::_CPANDateTimeObjectCreate][Line:1812]: Invalid value for String: 202119-1-19 07:15:54.
Jan 20 08:12:54 otrs-itsm-prod OTRS-CGI-25[415]: [Error][Kernel::System::DateTime::new][Line:174]: Error creating DateTime object ( 'String' => '202119-1-19 07:15:54' ).
Jan 20 08:14:04 otrs-itsm-prod OTRS-CGI-25[412]: [Error][Kernel::System::DateTime::_StringToHash][Line:1753]: Invalid date/time string 202119-1-19 07:15:54.
Jan 20 08:14:04 otrs-itsm-prod OTRS-CGI-25[412]: [Error][Kernel::System::DateTime::_CPANDateTimeObjectCreate][Line:1812]: Invalid value for String: 202119-1-19 07:15:54.
Jan 20 08:14:04 otrs-itsm-prod OTRS-CGI-25[412]: [Error][Kernel::System::DateTime::new][Line:174]: Error creating DateTime object ( 'String' => '202119-1-19 07:15:54' ).

error log:
RequestURI: /otrs/index.pl?Action=AdminLog

Traceback (32513):
Module: Kernel::System::DateTime::new Line: 174
Module: Kernel::System::ObjectManager::_ObjectBuild Line: 306
Module: Kernel::System::ObjectManager::Create Line: 241
Module: Kernel::Modules::AdminLog::Run Line: 63
Module: Kernel::System::Web::InterfaceAgent::Run Line: 1135
Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler Line: 38
Module: (eval) (v1.99) Line: 207
Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
Module: ModPerl::Registry::handler (v1.99) Line: 32

[Wed Jan 20 07:53:13.715971 2021] [:error] [pid 32513] Can't call method "ToTimeZone" on an undefined value at /opt/otrs/Kernel/Modules/AdminLog.pm line 71.\n


dazu Frage: wie wird das Datum zusammengebaut und wo kann ich das ändern?
Wenn Znuny jetzt die Security Patche verteilt, wie kommt man künftig mit Bugs klar?
OTRS 6.0.30 /OS: Ubuntu/ Mysql
root
Administrator
Posts: 3954
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Customer Location TimeZone

Post by root »

NancyL wrote: 20 Jan 2021, 10:54

dazu Frage: wie wird das Datum zusammengebaut und wo kann ich das ändern?
Wenn Znuny jetzt die Security Patche verteilt, wie kommt man künftig mit Bugs klar?
Hi Nancy,

- zu Frage 1: das Format steht in Kernel/Language/xx.pm drin. Ich glaube mich zu erinnern im Englischen Bereich gab's dazu auch mal was.
- zu Frage 2: Znuny verteilt nicht nur Security Patche sondern auch Bugfixe. Wenn Du also was findet einfach unter github.com/znuny/znuny/issues/new melden, wir nehmen aber auch gerne Pull Request ;-)

Gruss
Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Customer Location TimeZone

Post by reneeb »

Habt ihr vielleicht irgendwelche Anpassungen an der Kernel/Language/hu.pm oder eine eigene Kernel/Language/hu_xxxxxx.pm?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
NancyL
Znuny expert
Posts: 247
Joined: 05 Aug 2014, 08:13
Znuny Version: 6.0.30
Real Name: Nancy

Re: Customer Location TimeZone

Post by NancyL »

Hey Renee,
nein keine Anpassungen in den Dateien zu HU.
Wir arbeiten auch zum ersten mal mit HU....
ich habe komplett die Installationsdateien:
-rw-rw---- 1 otrs www-data 52528 Okt 22 06:22 hu_FAQ.pm
-rw-rw---- 1 otrs www-data 2832 Okt 22 06:24 hu_GeneralCatalog.pm
-rw-rw---- 1 otrs www-data 6674 Okt 22 06:27 hu_ImportExport.pm
-rw-rw---- 1 otrs www-data 112976 Okt 22 06:25 hu_ITSMChangeManagement.pm
-rw-rw---- 1 otrs www-data 42991 Okt 22 06:25 hu_ITSMConfigurationManagement.pm
-rw-rw---- 1 otrs www-data 22694 Okt 22 06:24 hu_ITSMCore.pm
-rw-rw---- 1 otrs www-data 16876 Okt 22 06:24 hu_ITSMIncidentProblemManagement.pm
-rw-rw---- 1 otrs www-data 896484 Sep 29 15:54 hu.pm

Hallo Roy :)
schön von dir zu hören und toll das die znuny sich darum kümmern wird. Die Situation ist nicht so fein. Jetzt bereue ich es doch ein wenig das ich nie zu den Community Treffen gefahren bin....

aber gut... in der hu.pm steht das

# date formats (%A=WeekDay;%B=LongMonth;%T=Time;%D=Day;%M=Month;%Y=Year;)
$Self->{DateFormat} = '%Y-%M-%D %T';
$Self->{DateFormatLong} = '%Y. %B %D. %A %T';
$Self->{DateFormatShort} = '%Y-%M-%D';
$Self->{DateInputFormat} = '%Y-%M-%D';
$Self->{DateInputFormatLong} = '%Y-%M-%D - %T';
$Self->{Completeness} = 1;


in der de.pm liest es sich so:
# date formats (%A=WeekDay;%B=LongMonth;%T=Time;%D=Day;%M=Month;%Y=Year;)
$Self->{DateFormat} = '%D.%M.%Y %T';
$Self->{DateFormatLong} = '%T - %D.%M.%Y';
$Self->{DateFormatShort} = '%D.%M.%Y';
$Self->{DateInputFormat} = '%D.%M.%Y';
$Self->{DateInputFormatLong} = '%D.%M.%Y - %T';
$Self->{Completeness} = 1;


ich habe die Zeit mit im log angegeben (Error creating DateTime object ( 'String' => '202119-1-19 07:15:54' ).) also ,muss der falsche Wert sich unter DateFormat oder DateFormatLong befinden.

Sonst alles fein bei dir?
lg
nancy
NancyL
Znuny expert
Posts: 247
Joined: 05 Aug 2014, 08:13
Znuny Version: 6.0.30
Real Name: Nancy

Re: Customer Location TimeZone

Post by NancyL »

Okay,
ich habe es dann dank deiner Hilfe gefixed @ Roy

in der HU.pm unter /Kernel/Language der Teil $Self->{DateFormatLong} = '%Y. %B %D. %A %T'; in '%Y-%M-%D - %T'; geändert.
Aoache läuft nun sauber

$Self->{Charset} = ['utf-8', ];
# date formats (%A=WeekDay;%B=LongMonth;%T=Time;%D=Day;%M=Month;%Y=Year;)
$Self->{DateFormat} = '%Y-%M-%D %T';
# $Self->{DateFormatLong} = '%Y. %B %D. %A %T';
$Self->{DateFormatLong} = '%Y-%M-%D - %T';
$Self->{DateFormatShort} = '%Y-%M-%D';
$Self->{DateInputFormat} = '%Y-%M-%D';
$Self->{DateInputFormatLong} = '%Y-%M-%D - %T';
$Self->{Completeness} = 1;
OTRS 6.0.30 /OS: Ubuntu/ Mysql
root
Administrator
Posts: 3954
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Customer Location TimeZone

Post by root »

NancyL wrote: 20 Jan 2021, 13:28 Okay,
ich habe es dann dank deiner Hilfe gefixed @ Roy

in der HU.pm unter /Kernel/Language der Teil $Self->{DateFormatLong} = '%Y. %B %D. %A %T'; in '%Y-%M-%D - %T'; geändert.
Aoache läuft nun sauber

$Self->{Charset} = ['utf-8', ];
# date formats (%A=WeekDay;%B=LongMonth;%T=Time;%D=Day;%M=Month;%Y=Year;)
$Self->{DateFormat} = '%Y-%M-%D %T';
# $Self->{DateFormatLong} = '%Y. %B %D. %A %T';
$Self->{DateFormatLong} = '%Y-%M-%D - %T';
$Self->{DateFormatShort} = '%Y-%M-%D';
$Self->{DateInputFormat} = '%Y-%M-%D';
$Self->{DateInputFormatLong} = '%Y-%M-%D - %T';
$Self->{Completeness} = 1;
Hi Nancy,

also wenn das wirklich ein Bug ist, dann mach doch bitte ein Issue auf https://github.com/znuny/Znuny/issues/new/choose - oder gleich einen Pull Request

Gruss Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
NancyL
Znuny expert
Posts: 247
Joined: 05 Aug 2014, 08:13
Znuny Version: 6.0.30
Real Name: Nancy

Re: Customer Location TimeZone

Post by NancyL »

Mach ich, lass mich das aber noch mal genau prüfen. Hab das Format noch nicht verstanden, nur kopiert.
OTRS 6.0.30 /OS: Ubuntu/ Mysql
Post Reply