Re: maximum day of month

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Wed, 22 Jul 2009 12:45:52 -0400, r norman <r_s_norman@xxxxxxxxxxx>
wrote:

We may have starting
talking about clock_t and time_t but there is a historic reason why
time_t used only 31 bits in many implementations.

Wiki says:

http://en.wikipedia.org/wiki/Unix_time
<q>
There was originally some controversy over whether the Unix time_t should
be signed or unsigned. If unsigned, its range in the future would be
doubled, postponing the 32-bit overflow (by 68 years). However, it would
then be incapable of representing times prior to 1970. Dennis Ritchie, when
asked about this issue, said that he hadn't thought very deeply about it,
but was of the opinion that the ability to represent all times within his
lifetime would be nice. (Ritchie's birth, in 1941, is around Unix time
-893,400,000.) The consensus is for time_t to be signed, and this is the
usual practice. The software development platform for version 6 of the QNX
operating system has an unsigned 32-bit time_t, though older releases used
a signed type.
</q>

It sounds like it was more of a functional choice than being constrained by
the unavailability of unsigned integers. Then again, I've never used a
Standard C implementation that defined any negative value for time_t other
than -1, so I don't know how accurate this Wiki article is. I would guess
they're not talking about "time_t" but instead whatever type Ritchie used
when he created Unix.

Wikipedkia states:
" ISO C defines time_t as an arithmetic type, but does not specify any
particular type, range, resolution, or encoding for it".
http://en.wikipedia.org/wiki/Time_t

Which is basically what I said earlier, less the bit about "arithmetic
type", which is a technical term I didn't feel like defining.

--
Doug Harrison
Visual C++ MVP
.



Relevant Pages

  • Re: delete-file & probe-file on directories
    ... >> Another way of stating the same argument: I accept that Common Lisp's ... But there's a difference between implementations deciding to map ... past, present, and future filesystems. ... be deployed on Windows and Unix I know I can run my code in any Common ...
    (comp.lang.lisp)
  • Re: Smalltalk-like Tools
    ... One big difference between Common Lisp as specified, and Smalltalk, is ... gather the information it needs on the various implementations. ... Well, the advantages of the unix approach are clear, ... development environment. ...
    (comp.lang.lisp)
  • [OT] Re: How does C work on non-unix?
    ... majority of compilers targeted at OSes targeted at desktop users use ... Unix has some clever bits that let different programs ... simply include their own "libc" implementations in the ... brownness setting, blah blah blah. ...
    (comp.lang.c)
  • Re: Which Visual C++?
    ... must come with a C compiler too. ... The list of conforming UNIX 03 implementations is growing, ... what is Apple shipping _other_ than GCC? ...
    (comp.lang.c)
  • Re: convert Tcl fd to C fd
    ... fd so that I can pass the fd to a C routine for custom I/O ... I've checked the wiki and searched on line without ... windows on c.l.t a while a ago). ... This is the Unix version: ...
    (comp.lang.tcl)