Localize current time in PHP

前端 未结 3 1623
情歌与酒
情歌与酒 2021-01-13 01:04

Trying to display current time with PHP (using this):

$date = date(\'m/d/Y h:i:s a\', time());                      
echo $date;

As simple

3条回答
  •  不要未来只要你来
    2021-01-13 02:00

    Zend_Date is completely internationalized. You should check that out for a simple way to do it:

    All full and abbreviated names of months and weekdays are supported for more than 130 languages. Methods support both input and the output of dates using the localized names of months and weekdays, in the conventional format associated with each locale.

提交回复
热议问题