Bug #17335 Updated: mktime() Off by One?

From: Date: Tue, 21 May 2002 15:34:09 +0000
Subject: Bug #17335 Updated: mktime() Off by One?
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-8098@lists.php.net to get a copy of this message
ID: 17335 Updated by: hholzgra@php.net Reported By: hz11@nyu.edu -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Linux PHP Version: 4.2.1 New Comment: localtime() mimics the C behaviour which is zero-based while mktime() is for humans and has no C counterpart, so it uses the more convenient 1-based stuff just use getdate() instad of localtime() and you'll be fine Previous Comments: ------------------------------------------------------------------------ [2002-05-21 10:28:04] hz11@nyu.edu In the array returned from localtime(), tm_mon starts from 0. However, the month field in mktime() starts from 1. Is there the way it is in C, or is this a PHP implementation bug? Thanks, Hans ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17335&edit=1

« previous php.bugs (#8098) next »