php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6946 date should use the current locale, instead of always returning dates in englis
Submitted: 2000-09-29 17:14 UTC Modified: 2000-11-09 05:13 UTC
From: wico at cnh dot nl Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.0 Latest CVS (29/09/2000) OS: linux
Private report: No CVE-ID: None
 [2000-09-29 17:14 UTC] wico at cnh dot nl
Hiya

date should use the current locale, instead of always returning dates in english

setlocale(LC_TIME, "nl_NL");
$temp = date("d M Y H:i", time()); //this still gives the english date
$temp = strftime("%d %b %Y %H:%M", time()); //this gives the correct, dutch date

Greetz,

Wico

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-09 05:13 UTC] hholzgra@php.net
From the manual:

 " To format dates in other languages, 
         you should use the setlocale() and strftime() functions. "

you have been warned :)
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC