Re: [Windows + PHP5] Localizing date()?
On Fri, 28 Dec 2007 04:10:57 +0100, Gilles Ganault <nospam@xxxxxxxxxx>
wrote:
2. What would be the least complicated way to change this call to
date()?
For those interested, it seems like date() always displays date/time
using the US locale, while strftime() uses the selected locale.
For instance, the following does display the date according to the
French locale:
===========
setlocale(LC_ALL, 'French');
//27 December 2007
echo date('d F Y', '1198790064') . "<p>";
//27 décembre 2007
echo strftime('%d %B %Y', '1198790064');
===========
HTH,
.
Relevant Pages
- Re: does rubys strftime not attempt POSIX-compliance?
... it refers to the "POSIX locale concept" and the ruby compliance with it. ... MS> nothing in common with the libc strftime except the name;-) ... I started using this ISO date format next to my signature on forms back in the early eighties. ... (comp.lang.ruby) - Re: can strftime() product non-locale specific (i.e. UTC) results?
... don't use the conversion specifiers which are locale-sensitive. ... > date-time string format in UTC. ... > correct values but strftime() always assumes that the values are in local ... you're talking about local time, not locale. ... (comp.lang.c) - can strftime() product non-locale specific (i.e. UTC) results?
... date-time string format in UTC. ... correct values but strftime() always assumes that the values are in local ... I could manually adjust the struct tm values so that strftimewould ... generate the desired string but it gets really ugly when the locale is west ... (comp.lang.c) - Re: Localized strftime()
... > Sebastjan Trepca wrote: ... >> I'm trying to get a localized date format from strftime() but it seems ... > locale to a locale of your choice. ... (comp.lang.python) - Re: date string on current locale settings NEW question please....
... > when I do somthing like this: ... > current locale ... > and do the same call to strftime i get as below: ... > where does the strftime get the timezone info? ... (comp.os.linux.development.apps) |
|