# Herbert Straub 2001 # http://www.linuxhacker.at # Description: # http://www.linuxhacker.at/bugs-solved/python2.4-datetime-date-bug-hoary --- mxDateTime.c 2001-12-10 11:15:49.000000000 +0100 +++ /home/stb/mxDateTime.c 2005-07-01 08:46:25.767732696 +0200 @@ -1946,14 +1946,17 @@ 60.00 to show up even when the indictated time does not point to a leap second. */ second = floor(self->second * 100.0) / 100.0; + /* Straub 00.000 second formating problem with de_AT.utf8 */ if (self->year >= 0) - sprintf(buffer,"%04li-%02i-%02i %02i:%02i:%05.2f", + sprintf(buffer,"%04li-%02i-%02i %02i:%02i:%02i.%03i", (long)self->year,(int)self->month,(int)self->day, - (int)self->hour,(int)self->minute,(float)second); + (int)self->hour,(int)self->minute,abs(second), + abs((second-(double)abs(second)))*1000.0); else - sprintf(buffer,"-%04li-%02i-%02i %02i:%02i:%05.2f", + sprintf(buffer,"-%04li-%02i-%02i %02i:%02i:%02i.%03i", (long)-self->year,(int)self->month,(int)self->day, - (int)self->hour,(int)self->minute,(float)second); + (int)self->hour,(int)self->minute,abs(second), + abs((second-(double)abs(second)))*1000.0); } /* Returns a string indicating the date in ISO format. */