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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sun Dec 22 01:01:30 2024 UTC