From: Reini U. <ru...@x-...> - 2001-03-16 09:07:18
|
win2000: on cygwin (latest) all these date commands just do the C locale. but php is better: I use the [2001-02-20] php4.0.5-dev testbranch (the second i guess, but locale stuff didn't change) from the german binary download site http://www.mm4.de/php4win/. <dl> <dt>php version:</dt><dd><b><?php print phpversion()?></b></dd> <dt>server api:</dt><dd><b><?php print function_exists("php_sapi_name") ? php_sapi_name() : "unable to detect" ?></b></dd> <dt>system:</dd><dd><b><?php print function_exists("php_uname") ? php_uname() : "unable to detect" ?></b></dd> <?php function testlctime ($loc) { setlocale ("LC_TIME", $loc); echo "<dt>$loc:</dt><dd><b>"; echo strftime ("%a., %d. %b %Y - %x %X", time()); echo "</b></dd>"; } testlctime ("de"); // wrong testlctime ("de_AT"); // wrong testlctime ("de_DE"); // wrong testlctime ("deutsch"); // wrong testlctime ("german"); // okay ?> </dl> => php version: 4.0.5-dev server api: apache system: Windows NT 5.0 build 2195 de: Fri., 16. Mar 2001 - 03/16/01 09:05:21 de_AT: Fri., 16. Mar 2001 - 03/16/01 09:05:21 de_DE: Fri., 16. Mar 2001 - 03/16/01 09:05:21 deutsch: Fri., 16. Mar 2001 - 03/16/01 09:05:21 german: Fr., 16. Mrz 2001 - 16.03.2001 09:05:21 Jeff Dairiki schrieb: > > >Suse v?? glibc-2.1 > > I suspect all glibc-2.x's will work similarly. Older libc's (and > non glibc's, I don't know about.) > > >$LANG=de date "+%x %X" > >03/15/01 02:06:00 > > That's a failure (just like I saw in my tests). It's can't find 'de', > so the locale defaults to "C". You can be even more sure of this > by printing the day-name: > > LANG=de_DE date +%A > Mittwoch > > LANG=de date +%A > Wednesday > > So tell me again: which of these worked under which version(s) of > Windows? > > I just tested an older SunOS machine: 'de' and 'de_AT' worked, but NOT > 'de_DE' nor 'german' nor 'deutsch'. Ug. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |