gmmktime is broken [Bug #1529]

From: Date: Mon, 14 Jun 1999 19:57:47 +0000
Subject: gmmktime is broken [Bug #1529]
Groups: php.dev 
Request: Send a blank email to php-dev+get-6961@lists.php.net to get a copy of this message
Forgive me for addressing all of you, but the person with whom I was speaking has not had a chance to reply to my most recent email and I am under some time constraints. The basic premise of the bug report is that I maintain that gmmktime is broken. The last response I received was: > This is a documentation bug. The argument you pass to gmmktime is > in local time, not GMT. The function would be useless, if you > pass in GMT and get GMT out (you could use mktime for that). It's > intended to be a conversion function from local time (in) to GMT > (out). Is this true? This seems to be incorrect to me. If I pass gmmktime a value of 0,0,0,1,1,1970 in my time zone (GMT -5), as the code stands, I would get back a value of 36000 which is: GMT -5: 5:00:00 1/1/1970 GMT: 10:00:00 1/1/1970 GMT +2: 12:00:00 1/1/1970 The only location at which I would receive a value of midnight January 1,1970 would be at the completely unrelated location of (GMT -10). So I guess I don't understand what gmmktime is accomplishing here? Additionally, to my knowledge there is, in fact, no way to get a value of 0 from 0,0,0,1,1,1970 being passed to mktime, as (in my locale) it would return a value of 18000 and would be correct. Since there is no method (at least to my knowledge) to know the time zone modifier of the current locale in PHP. -- "If you ever see me getting beaten by the police, put down the video camera and come help me." -Bobcat Goldthwait Cole Tuininga Network Admin Trade Services, Inc Egon@tradeservices.com (603) 427-1100

« previous php.dev (#6961) next »