Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Template/Plugin/Date.pm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use constant HAS_SETLOCALE => $Config::Config{d_setlocale};

our $VERSION = '3.106';
our $FORMAT = '%H:%M:%S %d-%b-%Y'; # default strftime() format
our @LOCALE_SUFFIX = qw( .ISO8859-1 .ISO_8859-15 .US-ASCII .UTF-8 );
our @LOCALE_SUFFIX = qw( .UTF-8 .ISO8859-1 .ISO_8859-15 .US-ASCII );


#------------------------------------------------------------------------
Expand Down Expand Up @@ -164,7 +164,7 @@ sub format {
: undef;

# some systems expect locales to have a particular suffix
for my $suffix ('', @LOCALE_SUFFIX) {
for my $suffix (@LOCALE_SUFFIX, '') {
my $try_locale = $locale.$suffix;
my $setlocale = HAS_SETLOCALE
? &POSIX::setlocale(&POSIX::LC_ALL, $try_locale)
Expand Down
2 changes: 1 addition & 1 deletion t/date.t
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ sub time_locale {
: undef;

# some systems expect locales to have a particular suffix
for my $suffix ('', @Template::Plugin::Date::LOCALE_SUFFIX) {
for my $suffix (@Template::Plugin::Date::LOCALE_SUFFIX, '') {
my $try_locale = $locale.$suffix;
my $setlocale = $Config{d_setlocale}
? &POSIX::setlocale(&POSIX::LC_ALL, $try_locale)
Expand Down