Bug #18115: timestamp of the 1st of one month, gets valued as previous month
| From: | randy at careerstep dot com | Date: | Tue, 02 Jul 2002 17:11:46 +0000 |
| Subject: | Bug #18115: timestamp of the 1st of one month, gets valued as previous month | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-12827@lists.php.net to get a copy of this message | ||
From: randy@careerstep.com
Operating system: FreeBSD
PHP version: 4.0CVS-2002-07-02
PHP Bug Type: *Calendar problems
Bug description: timestamp of the 1st of one month, gets valued as previous month
Lets say you have a directory of 1000 files give or take any number, and
you want to archive (or delete) many of those files by month. Each file
contains a time stamp of when it was last modified. If I create a new
directory called January and take use each time stamp to tell me which
ones where last modified in the month January, then it returns all files
in January and Feb 1st. The same thing with all the other months. I've
tried this using the date and getdate function, and have had the same
problem. It acts like the date for PHP is one day off the date of FreeBSD.
I've tested it on 2 different FreeBSD servers.
When I use the php functions to get the time for the first of the month,
everything works well. But when I use the time stamp associated with a
file, then it's one day off.
--
Edit bug report at http://bugs.php.net/?id=18115&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18115&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18115&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18115&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18115&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18115&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18115&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18115&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18115&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18115&r=globals