Article View: comp.std.c++
Article #3195Re: Time representations
From: James Kanze US/ESC 60/3/141 #407...
Date: Thu, 01 Feb 1996 22:45
Date: Thu, 01 Feb 1996 22:45
38 lines
2559 bytes
2559 bytes
In article <tuivhsd7fn.fsf@nemo.bedford.waii.com>
gsez020@nemo.bedford.waii.com (Pete Forman) writes:
|> >>>>> "Max" == Max TenEyck Woodbury <mtew@cds.duke.edu> writes:
|> Max> First, the range specified for tm_sec is 0-59.
|> My documentation (IRIX 6.1) gives the range as 0-61. I presume that
|> the current standard does cover leap seconds and that your copy is out
|> of date. I don't understand why it's not 0-60, though.
A bug in the C standard:-). This was discussed some time back on
comp.std.c. If I remember correctly, the correction from 0-59 was
made at the last minute. It was pointed out that there had even been
a year with two leap seconds, so they made provision for two leap
seconds:-). Of course, with a maximum of two leap seconds per year,
no one is going to put them in the same hour.
|> Your remaining points have little relevance. localtime() and friends
|> are indeed only useful for the Gregorian calendar. If you were to try
|> to extend to other calendars you would have difficulty specifying the
|> rules. Days may start at dusk, months according to observations of
|> the moon. Programs can only approximate the future and look up the
|> past.
Agreed. There is a package on the net somewhere that will handle all
of the other time systems, though. Or so I have heard.
--
James Kanze Tel.: (+33) 88 14 49 00 email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils, études et réalisations en logiciel orienté objet --
-- A la recherche d'une activité dans une region francophone
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is
summarized in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
]
Technical Details
Message-ID:
<KANZE.96Feb1124302@slsvewt.lts.sel.alcatel.de>Path:
arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamageReferences:
<4emq2k$ecu@news.duke.edu> <tuivhsd7fn.fsf@nemo.bedford.waii.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763) Newsgroups: comp.std.c++ Subject: Re: Time representations Date: 1 Feb 1996 22:45:59 GMT Organization: SEL Sender: news@lts.sel.alcatel.de Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <KANZE.96Feb1124302@slsvewt.lts.sel.alcatel.de> References: <4emq2k$ecu@news.duke.edu> <tuivhsd7fn.fsf@nemo.bedford.waii.com> NNTP-Posting-Host: taumet.eng.sun.com Content-Type: text In-Reply-To: gsez020@nemo.bedford.waii.com's message of 01 Feb 96 02:09:05 GMT Apparently-To: std-c++@ncar.ucar.edu Content-Length: 1617 Originator: clamage@taumet