our_region62 (our_region62) wrote in ru_perl,
our_region62
our_region62
ru_perl

locale ubuntu mojo

Всем привет, то-ли лыжи не едут то-ли я не так делаю.

#locale
LANG=ru_RU.UTF-8
LANGUAGE=ru_RU:en
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC=ru_RU.UTF-8
LC_TIME=ru_RU.UTF-8
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY=ru_RU.UTF-8
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER=ru_RU.UTF-8
LC_NAME=ru_RU.UTF-8
LC_ADDRESS=ru_RU.UTF-8
LC_TELEPHONE=ru_RU.UTF-8
LC_MEASUREMENT=ru_RU.UTF-8
LC_IDENTIFICATION=ru_RU.UTF-8
LC_ALL=

[Spoiler (click to open)]

use DateTime::Format::SQLite;
use locale;
use POSIX qw( locale_h strftime );
setlocale(LC_ALL,"ru_RU.UTF8");

my @stash;

while (my $archive = $rs->next) {

my $dt = DateTime::Format::SQLite->parse_datetime( $archive->postime );

$dt->set_time_zone('Europe/Moscow');

push @stash, $dt->strftime('%B %Y');

}

В результате названия месяцев на английском, а хочется на русском. Куда ещё покопать, что прочесть? Спасибо.
Tags: locale mojolicious datetime
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 22 comments