| delorie.com/archives/browse.cgi | search |
| From: | "Alex Vinokur" <alexvn AT bigfoot DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: mktime() for 1969 & 2106 |
| Date: | Wed, 22 May 2002 07:59:54 +0200 |
| Organization: | Scopus |
| Lines: | 101 |
| Message-ID: | <acf8gt$p1t4u$1@ID-79865.news.dfncis.de> |
| References: | <Pine DOT SUN DOT 3 DOT 91 DOT 1020521130646 DOT 7489B-100000 AT is> <acdagr$p28b5$1 AT ID-79865 DOT news DOT dfncis DOT de> <3CEA49C3 DOT 504 AT bigfoot DOT com> <4098-Tue21May2002191554+0300-eliz AT is DOT elta DOT co DOT il> |
| NNTP-Posting-Host: | gateway.scopus.net (62.90.123.5) |
| X-Trace: | fu-berlin.de 1022043486 26277022 62.90.123.5 (16 [79865]) |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Newsreader: | Microsoft Outlook Express 6.00.2600.0000 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
"Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> wrote in message news:4098-Tue21May2002191554+0300-eliz AT is DOT elta DOT co DOT il...
| > From: Alex Vinokur <alexvn AT bigfoot DOT com>
| > Newsgroups: comp.os.msdos.djgpp
| > Date: Tue, 21 May 2002 15:21:07 +0200
| >
| > We can see that still there is a problem in interval
| > [ 1970:01:01::00:00:00 - 1970:01:01::01:59:58 ].
|
| For your timezone, any time before 1970:01:01::01:59:59 is invalid,
| since that's before the beginning of the epoch (you are 2 hours ahead
| of UTC). The fact that some values before that _are_ representable
| is probably some subtle bug in mktime.
|
[snip]
Yes, it is. Also for 2106.
--------- mktime() results : BEGIN ---------
DATA-TIME 1969:12:31::23:00:57 ---> mktime() can't return required time
DATA-TIME 1969:12:31::23:00:58 ---> mktime() can't return required time
DATA-TIME 1969:12:31::23:00:59 ---> mktime() can't return required time
DATA-TIME 1969:12:31::23:01:00 ---> mktime() can't return required time
DATA-TIME 1969:12:31::23:01:01 ---> mktime() can't return required time
DATA-TIME 1969:12:31::23:01:02 ---> mktime() can't return required time
DATA-TIME 1969:12:31::23:59:57 ---> mktime() can't return required time
DATA-TIME 1969:12:31::23:59:58 ---> mktime() can't return required time
DATA-TIME 1969:12:31::23:59:59 ---> mktime() can't return required time
DATA-TIME 1970:01:01::00:00:00 ---> 004294960096
DATA-TIME 1970:01:01::00:00:01 ---> 004294960097
DATA-TIME 1970:01:01::00:00:02 ---> 004294960098
DATA-TIME 1970:01:01::01:00:00 ---> 004294963696
DATA-TIME 1970:01:01::01:00:01 ---> 004294963697
DATA-TIME 1970:01:01::01:00:02 ---> 004294963698
DATA-TIME 1970:01:01::01:59:57 ---> 004294967293
DATA-TIME 1970:01:01::01:59:58 ---> 004294967294
DATA-TIME 1970:01:01::01:59:59 ---> mktime() can't return required time
DATA-TIME 1970:01:01::02:00:00 ---> 000000000000
DATA-TIME 1970:01:01::02:00:01 ---> 000000000001
DATA-TIME 1970:01:01::02:00:02 ---> 000000000002
DATA-TIME 1970:01:01::03:00:00 ---> 000000003600
DATA-TIME 1970:01:01::03:00:01 ---> 000000003601
DATA-TIME 1970:01:01::03:00:02 ---> 000000003602
DATA-TIME 2106:02:07::06:28:12 ---> 004294960092
DATA-TIME 2106:02:07::06:28:13 ---> 004294960093
DATA-TIME 2106:02:07::06:28:14 ---> 004294960094
DATA-TIME 2106:02:07::06:28:15 ---> 004294960095
DATA-TIME 2106:02:07::06:28:16 ---> 004294960096
DATA-TIME 2106:02:07::06:28:17 ---> 004294960097
DATA-TIME 2106:02:07::06:28:18 ---> 004294960098
DATA-TIME 2106:02:07::08:28:11 ---> 004294967291
DATA-TIME 2106:02:07::08:28:12 ---> 004294967292
DATA-TIME 2106:02:07::08:28:13 ---> 004294967293
DATA-TIME 2106:02:07::08:28:14 ---> 004294967294
DATA-TIME 2106:02:07::08:28:15 ---> mktime() can't return required time
DATA-TIME 2106:02:07::08:28:16 ---> 000000000000
DATA-TIME 2106:02:07::08:28:17 ---> 000000000001
DATA-TIME 2106:02:07::08:28:18 ---> 000000000002
DATA-TIME 2106:02:07::08:28:19 ---> 000000000003
DATA-TIME 2106:02:07::08:28:57 ---> 000000000041
DATA-TIME 2106:02:07::08:28:58 ---> 000000000042
DATA-TIME 2106:02:07::08:28:59 ---> 000000000043
DATA-TIME 2106:02:07::08:29:00 ---> mktime() can't return required time
DATA-TIME 2106:02:07::08:29:01 ---> mktime() can't return required time
DATA-TIME 2106:02:07::08:29:02 ---> mktime() can't return required time
DATA-TIME 2106:02:07::08:29:03 ---> mktime() can't return required time
--------- mktime() results : END -----------
Are 'mktime() implementations on different platforms' essentially different ?
Similar program on SunOS 5.6 with gcc 2.91.57 had no problem :
http://groups.google.com/groups?selm=7vrrsi%24ii8%241%40nnrp1.deja.com
Thanks.
--
====================
Alex Vinokur
http://up.to/alexvn
http://go.to/alexv_math
mailto:alexvn AT bigfoot DOT com
mailto:alexvn AT go DOT to
====================
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |