Bug 60350 - ftime millisecond rollover off by one
Summary: ftime millisecond rollover off by one
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc   
(Show other bugs)
Version: 7.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2002-02-26 12:05 UTC by ae
Modified: 2016-11-24 15:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-03-04 15:48:50 UTC
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 05:00:00 UTC

Description ae 2002-02-26 12:05:55 UTC
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 09:04:16 UTC
Fixed in glibc-2.2.4-24.

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