Bug 60350 - ftime millisecond rollover off by one
ftime millisecond rollover off by one
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-02-26 07:05 EST by ae
Modified: 2007-04-18 12:40 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-03-04 10:48:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description ae 2002-02-26 07:05:55 EST
RHL 7.2, glibc-2.2.4-19.3

Code snippet:

  struct timeb T;
  ftime (&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.
Comment 2 Jakub Jelinek 2002-04-05 04:04:16 EST
Fixed in glibc-2.2.4-24.

Note You need to log in before you can comment on or make changes to this bug.