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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wico at cnh dot nl
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC