[En-Nut-Discussion] problem with date 31.8.2005

Peter Sodermanns peter.sodermanns at aixcon.de
Wed Aug 31 08:58:54 CEST 2005


Hi all,

is it possible that in ethernut-land no august 31. is known?
I just set the date of my ethernut V 2 to "31.08.2005", but he replies 
constantly with "1.9.2005".

Here's the piece of code:
(I put day, month and year values into var time_struct)

   my_time = mktime(time_struct);
   stime(&my_time);
   #ifdef DEBUG
     printf("  my_time = %lu\n", my_time);
   #endif
   time_struct = localtime(&my_time);

   printf_P(fmt_Print, time_struct->tm_mday, time_struct->tm_mon,
      time_struct->tm_year+1900, time_struct->tm_hour,
      time_struct->tm_min, time_struct->tm_sec);


Setting date = 31.08.2005 and time = 8:41 yields a value of 1128152460 
for "my_time". But the printf_P shows "01.09.2005 08:41:00"!
Until yesterday all dates were accepted correctly.

What's going wrong?


Sincerely
             Peter



More information about the En-Nut-Discussion mailing list