Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
出于某种原因,它向我显示了不正确的分钟、小时和月份。它应该显示“十月”和正确的分钟和小时。
setlocale(LC_ALL, 'et'); $date = strtotime($row['date']); echo date("d B Y H:i", mktime($date));
您应该使用strftime()而不是date(). (date()不知道区域设置。)
strftime()
date()
http://php.net/strftime
并且mktime()不需要。strtotime()已经设置$date为时间戳。
mktime()
strtotime()
$date