Re: mktime() and (dates < 1970 || dates > 2037) (fwd)

From: Date: Mon, 10 Sep 2001 18:07:31 +0000
Subject: Re: mktime() and (dates < 1970 || dates > 2037) (fwd)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-65681@lists.php.net to get a copy of this message
Derick Rethans wrote: > I've read a lot of people are having problems using the function mktime() > in combination with dates before 1970 and after 2037. I also have been > reading about time_t and it being 32 bit, 64 bit signed or unsigned. In al > the responses I read it's not an PHP problem but an windows problem. lets say 'operating system' problem, as it's originaly a unix definition > Can > you explain why date-calculations with other software on the same computer > do work correctly on the same config. Other software being f.i. Mysql? How > is it they can get things to work and the people who develop PHP can't? lots of 3rd party libraries expect unix timestamps as function arguments or deliver them as function results even MySQL does so when using the UNIX_TIMESTAMP() function in queries we could escape the escape the UNIX domain by defining our own date format or data type, but only for a price the UNIX domain ( 1.1.1970 to somewhere around 2037 ) is a well known concept to UNIX developers and even to C/C++ developers on other platforms ( C mktime() and friends are defined in the C ANSI standard) if you need dates outside of this range you could for example use the PHP calendar extension http://php.net/calendar -- Hartmut Holzgraefe hartmut@six.de http://www.six.de +49-711-99091-77

« previous php.dev (#65681) next »