Red Hat Bugzilla – Bug 60350
ftime millisecond rollover off by one
Last modified: 2007-04-18 12:40:37 EDT
RHL 7.2, glibc-2.2.4-19.3
struct timeb T;
printf ("%d\n", T.millitm);
will sometimes produce value 1000. This isn't in explicit conflict
with 'man ftime' but it is surprising and not what you'd
expect from the 'millitm' name.
For comparison, here's a paragraph from 'man ftime' on Solaris 8:
The time and millitm members contain the seconds and mil-
liseconds portions, respectively, of the current time in
seconds since 00:00:00 UTC (Coordinated Universal Time),
January 1, 1970.
Fixed in glibc-2.2.4-24.