Bug 60350 - ftime millisecond rollover off by one
ftime millisecond rollover off by one
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2002-02-26 07:05 EST by ae
Modified: 2016-11-24 10:06 EST (History)
1 user (show)

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

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2002:056 contract SHIPPED_LIVE GNU C Library bugfix update 2002-04-02 00:00:00 EST

  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.