Project

General

Profile

Actions

Bug #16065

closed

lib.stdheader.5.date not localised

Added by ben van over 18 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Should have
Category:
Content Rendering
Target version:
-
Start date:
2006-04-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

lib.stdheader.5.date = l, d/m/Y

I have changed the default value of lib.stdheader.5.date to l, d/m/Y, which should show the full day name (l) In my config I have chosen the dutch locale, which functions for all extensions BTW like tt_news. The day remains english though.

(issue imported from #M3297)


Files

bug_3297.diff (389 Bytes) bug_3297.diff Administrator Admin, 2007-04-27 23:37
Actions #1

Updated by Rupert Germann over 18 years ago

the function date() in PHP seems not to care about locales as f.e. strftime() does.
if I execute this php script on my server:

echo strftime ("%A %e.%m.%Y", time())."\n"
.date('l d.m.Y')."\n";
?>

I see this output:
Thursday 20.04.2006
Thursday 20.04.2006

so far so good.
But when I execute this script which sets a locale for the date formatting:

setlocale (LC_ALL, 'nl_NL');

echo strftime ("%A %e.%m.%Y", time())."\n"
.date('l d.m.Y')."\n";
?>

I see this output:
donderdag 20.04.2006
Thursday 20.04.2006

so changing the date in lib.stdheader.5 to strftime does the trick

lib.stdheader.5.date >
lib.stdheader.5.strftime = %A, %d/%m/%Y

Actions #2

Updated by Matthias Kall over 17 years ago

With the attached diff the field is changed to strftime and it displays "%x" which is the date output in the current locale.

Actions #3

Updated by Martin Kutschker over 17 years ago

Fixed in SVN (needs compat version of 4,2)

Actions

Also available in: Atom PDF