Another question wrt gmmktime()

From: Date: Sat, 10 Jun 2000 20:24:45 +0000
Subject: Another question wrt gmmktime()
Groups: php.dev 
Request: Send a blank email to php-dev+get-20972@lists.php.net to get a copy of this message
Hi, Something else that's troubling me. gmmktime() is supposed to automatically correct for daylight savings time if you don't pass the flag, and it looks to me like it's not doing it correctly. For example, I'm in the CDT timezone right now, so I run this code: <? var_dump(date("M d, Y H:i:s", gmmktime(20, 0, 0, 6, 9, 2000))); ?> And I get: string(21) "Jun 09, 2000 14:00:00" Which is _6 hours_ difference instead of the correct 5 hours. Now let's run it with is_dst flag set to 1 and 0: <? var_dump(date("M d, Y H:i:s", gmmktime(20, 0, 0, 6, 9, 2000, 1))); var_dump(date("M d, Y H:i:s", gmmktime(20, 0, 0, 6, 9, 2000, 0))); ?> string(21) "Jun 09, 2000 14:00:00" string(21) "Jun 09, 2000 15:00:00" So, when it looks like it's doing it in reverse.... Am I just totally confused about how it's supposed to work? -Andrei * George Orwell was an optimist. *

« previous php.dev (#20972) next »