Hello!

On Tuesday 12 May 2009 06:20:57 Gustaf Neumann wrote:
> I don't see, how the locale settings can influence the %d formatting
> of stftime. But anyhow, it might be worth to check the output of
> 
> locale -k ru_RU.UTF-8 LC_TIME
> 
> on your system

$ locale -k ru_RU.UTF-8 LC_TIME
abday="Вск;Пнд;Втр;Срд;Чтв;Птн;Сбт"
day="Воскресенье;Понедельник;Вторник;Среда;Четверг;Пятница;Суббота"
abmon="Янв;Фев;Мар;Апр;Май;Июн;Июл;Авг;Сен;Окт;Ноя;Дек"
mon="Январь;Февраль;Март;Апрель;Май;Июнь;Июль;Август;Сентябрь;Октябрь;Ноябрь;Декабрь"
am_pm=";"
d_t_fmt="%a %d %b %Y %T"
d_fmt="%d.%m.%Y"
t_fmt="%T"
t_fmt_ampm=""
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries=""
week-ndays=7
week-1stday=19971130
week-1stweek=0
first_weekday=2
first_workday=2
cal_direction=1
timezone=""
date_fmt="%a %b %e %H:%M:%S %Z %Y"
time-codeset="UTF-8"

> hope, we are getting closer
> -gustaf neumann
> 
> ================== time-format.c
> #include <time.h>
> #include <stdio.h>
> 
> int main() {
>     time_t     clock = 0;
>     struct tm  time, *tmPtr=&time;
>     char       buf[40];
> 
>     tmPtr = gmtime_r(&clock,tmPtr);
>     strftime(buf, 40, "%a, %d %b %Y %H:%M:%S GMT", tmPtr);
>     fprintf(stderr,"%s\n",buf);
> }

$ gcc /tmp/time-format.c -o /tmp/time-format
$ /tmp/time-format
Thu, 01 Jan 1970 00:00:00 GMT


Best regards, Alexey Pechnikov.
http://pechnikov.tel/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<[email protected]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to