I am trying to understand where you placed your language option within the <language>.pm file. I tried just adding your lines to the existing file and a file of its own and neither worked.
Can you explain how you were able to adjust the time to 12hrs with your syntax above?
mod: link to original 5 year old topic
Date format spec?
Moderator: crythias
-
- Znuny advanced
- Posts: 133
- Joined: 07 Oct 2015, 05:54
- Znuny Version: 7.0.2
- Real Name: Tony
- Company: Upson Productions, LLC
- Location: DC
Date format spec?
Tony
OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments

OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Date format spec?
Hi :) Please note that you've resurrected a 5 year old thread. This may have moved to a different location (Time.pm?)
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny advanced
- Posts: 133
- Joined: 07 Oct 2015, 05:54
- Znuny Version: 7.0.2
- Real Name: Tony
- Company: Upson Productions, LLC
- Location: DC
Re: Date format spec?
haha, my appologies, I am new to the OTRS appliance; and even though their is a v5 release, I am a turnkeylinux guru so I am utilizing the Debian 8 revision of OTRS, so I am running v3.3.9. Even though the thread is very old, I assumed I should speak on an old thread to keep the version control identical; since most were talking about v3.x systems.
I will check the time.pm as you recommended to see if this information is in there. The <language>.pm file does have the time format information as the original owner of this post listed, thus it may still be within this file, I just couldnt understand where you are indicating to add this information (whether it required REM'n other information out of the file, or just plopping it at the top/bottom) of the file; leaving the same information there.
This is what is currently within the en.pm file:
I will check the time.pm as you recommended to see if this information is in there. The <language>.pm file does have the time format information as the original owner of this post listed, thus it may still be within this file, I just couldnt understand where you are indicating to add this information (whether it required REM'n other information out of the file, or just plopping it at the top/bottom) of the file; leaving the same information there.
This is what is currently within the en.pm file:
Code: Select all
# --
# Kernel/Language/en.pm - provides en_US languag translation
# Copyright (C) 2001-2014 xxx, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
package Kernel::Language::en;
use strict;
use warnings;
sub Data {
my $Self = shift;
# http://en.wikipedia.org/wiki/Date_and_time_notation_by_country#United_States
# month-day-year (e.g., "12/31/99")
# $$START$$
# Last translation file sync: Thu Apr 9 10:12:50 2009
# possible charsets
$Self->{Charset} = ['us-ascii', 'UTF-8', 'iso-8859-1', 'iso-8859-15', ];
# date formats (%A=WeekDay;%B=LongMonth;%T=Time;%D=Day;%M=Month;%Y=Year;)
$Self->{DateFormat} = '%M/%D/%Y %T';
$Self->{DateFormatLong} = '%T - %M/%D/%Y';
$Self->{DateFormatShort} = '%M/%D/%Y';
$Self->{DateInputFormat} = '%M/%D/%Y';
$Self->{DateInputFormatLong} = '%M/%D/%Y - %T';
$Self->{Separator} = ',';
# maybe nothing ... or help texts
$Self->{Translation} = {
'May_long' => 'May',
'History::Move' => 'Ticket moved into Queue "%s" (%s) from Queue "%s" (%s).',
'History::TypeUpdate' => 'Updated Type to %s (ID=%s).',
'History::ServiceUpdate' => 'Updated Service to %s (ID=%s).',
'History::SLAUpdate' => 'Updated SLA to %s (ID=%s).',
'History::NewTicket' => 'New Ticket [%s] created (Q=%s;P=%s;S=%s).',
'History::FollowUp' => 'FollowUp for [%s]. %s',
'History::SendAutoReject' => 'AutoReject sent to "%s".',
'History::SendAutoReply' => 'AutoReply sent to "%s".',
'History::SendAutoFollowUp' => 'AutoFollowUp sent to "%s".',
'History::Forward' => 'Forwarded to "%s".',
'History::Bounce' => 'Bounced to "%s".',
'History::SendAnswer' => 'Email sent to "%s".',
'History::SendAgentNotification' => '"%s"-notification sent to "%s".',
'History::SendCustomerNotification' => 'Notification sent to "%s".',
'History::EmailAgent' => 'Email sent to customer.',
'History::EmailCustomer' => 'Added email. %s',
'History::PhoneCallAgent' => 'Agent called customer.',
'History::PhoneCallCustomer' => 'Customer called us.',
'History::AddNote' => 'Added note (%s)',
'History::Lock' => 'Locked ticket.',
'History::Unlock' => 'Unlocked ticket.',
'History::TimeAccounting' => '%s time unit(s) accounted. Now total %s time unit(s).',
'History::Remove' => '%s',
'History::CustomerUpdate' => 'Updated: %s',
'History::PriorityUpdate' => 'Changed priority from "%s" (%s) to "%s" (%s).',
'History::OwnerUpdate' => 'New owner is "%s" (ID=%s).',
'History::ResponsibleUpdate' => 'New responsible is "%s" (ID=%s).',
'History::LoopProtection' => 'Loop-Protection! No auto-response sent to "%s".',
'History::Misc' => '%s',
'History::SetPendingTime' => 'Updated: %s',
'History::StateUpdate' => 'Old: "%s" New: "%s"',
'History::TicketDynamicFieldUpdate' => 'Updated: %s=%s;%s=%s;',
'History::WebRequestCustomer' => 'Customer request via web.',
'History::TicketLinkAdd' => 'Added link to ticket "%s".',
'History::TicketLinkDelete' => 'Deleted link to ticket "%s".',
'History::Subscribe' => 'Added subscription for user "%s".',
'History::Unsubscribe' => 'Removed subscription for user "%s".',
'History::SystemRequest' => 'System Request (%s).',
'History::EscalationResponseTimeNotifyBefore' => 'Escalation response time forewarned',
'History::EscalationUpdateTimeNotifyBefore' => 'Escalation update time forewarned',
'History::EscalationSolutionTimeNotifyBefore' => 'Escalation solution time forewarned',
'History::EscalationResponseTimeStart' => 'Escalation response time in effect',
'History::EscalationUpdateTimeStart' => 'Escalation update time in effect',
'History::EscalationSolutionTimeStart' => 'Escalation solution time in effect',
'History::EscalationResponseTimeStop' => 'Escalation response time finished',
'History::EscalationUpdateTimeStop' => 'Escalation update time finished',
'History::EscalationSolutionTimeStop' => 'Escalation solution time finished',
'History::ArchiveFlagUpdate' => 'Archive state changed: "%s"',
'History::TitleUpdate' => 'Title updated: Old: "%s", New: "%s"',
#CustomerUser fields
'Title{CustomerUser}' => 'Title',
'Firstname{CustomerUser}' => 'First name',
'Lastname{CustomerUser}' => 'Last name',
'Username{CustomerUser}' => 'Username',
'Email{CustomerUser}' => 'E-mail address',
'CustomerID{CustomerUser}' => 'Customer ID',
'Phone{CustomerUser}' => 'Phone',
'Fax{CustomerUser}' => 'Fax',
'Mobile{CustomerUser}' => 'Cellphone',
'Street{CustomerUser}' => 'Street',
'Zip{CustomerUser}' => 'ZIP code',
'City{CustomerUser}' => 'City',
'Country{CustomerUser}' => 'Country',
'Comment{CustomerUser}' => 'Comment',
#User field
'Title{user}' => 'Title',
};
# $$STOP$$
return;
}
1;
Tony
OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments

OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments
-
- Znuny advanced
- Posts: 133
- Joined: 07 Oct 2015, 05:54
- Znuny Version: 7.0.2
- Real Name: Tony
- Company: Upson Productions, LLC
- Location: DC
Re: Date format spec?
Actually, this just slipped right over my head in my reply, when I modify the en.pm file, it does break the information presented in the ticket, so it IS still using the en.pm file. 

Tony
OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments

OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments
-
- Znuny advanced
- Posts: 133
- Joined: 07 Oct 2015, 05:54
- Znuny Version: 7.0.2
- Real Name: Tony
- Company: Upson Productions, LLC
- Location: DC
Re: Date format spec?
Any update on where I should insert the data?
Tony
OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments

OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments
-
- Znuny advanced
- Posts: 133
- Joined: 07 Oct 2015, 05:54
- Znuny Version: 7.0.2
- Real Name: Tony
- Company: Upson Productions, LLC
- Location: DC
Re: Date format spec?
crythias, where should i add your code the language.pm file?
Tony
OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments

OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments
-
- Znuny advanced
- Posts: 133
- Joined: 07 Oct 2015, 05:54
- Znuny Version: 7.0.2
- Real Name: Tony
- Company: Upson Productions, LLC
- Location: DC
Re: Date format spec?
I am really trying to understand where you inserted the following code into the language.pm file. I am desperately trying to move away from the 24hr clock display.
Code: Select all
my $thour = substr($T, 0, 2);
my $tap = "am";
if ($thour > 12) {
$thour -= 12;
$tap = "pm";
}
my $test = substr($T, 0, 2, $thour);
if ($Short) {
$T =~ s/(\d\d:\d\d):\d\d/$1/g;
}
$T = $T . $tap;
$ReturnString =~ s/\%T/$T/g;
$ReturnString =~ s/\%D/$D/g;
$ReturnString =~ s/\%M/$M/g;
$ReturnString =~ s/\%Y/$Y/g;
Tony
OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments

OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments