For the Russian language and UTF-8, you can use this code. Work in Widows and Unix .
header('Content-type: text/html; charset=utf-8'); $locale_time = setlocale (LC_TIME, 'ru_RU.UTF-8', 'Rus'); function strf_time($format, $timestamp, $locale) { $date_str = strftime($format, $timestamp); if (strpos($locale, '1251') !== false) { return iconv('cp1251', 'utf-8', $date_str); } else { return $date_str; } } echo strf_time("%A, %B %d", time(), $locale_time);
Result:
, 13
source share