Re: timestamp question
| From: | (Philip Hallstrom) | Date: | Thu, 10 Aug 2000 20:33:08 +0000 |
| Subject: | Re: timestamp question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-11221@lists.php.net to get a copy of this message | ||
From the manual...under Date & Time functions.
mktime -- Get UNIX timestamp for a date
Description
int mktime(int hour, int minute, int second, int month, int day, int
year, int [is_dst] );
Warning: Note the strange order of arguments, which differs from the
order of arguments in a regular UNIX mktime() call and which does not
lend itself well to leaving out parameters from right to left (see
below). It is a common error to mix these values up in a script.
Returns the Unix timestamp corresponding to the arguments given. This
timestamp is a long integer containing the number of seconds between the
Unix Epoch (January 1 1970) and the time specified.
..
-philip
In article <F99F3F7C7049D211BC700008C7B1F0900759AB3D@texas.econophone.com>,
Paulson, Joseph V. \"Jay\" <jay.paulson@viatel.com> wrote:
>Hello everyone--
>
>Thanks for the help with the calendar function stuff I just asked. Now
>here's a question for everyone, but let me explain it first. Here's some
>code to help out.
>
>$timestamp = time();
>$month = date("n", $timestamp);
>
>Okay this get's you the month as a number (i.e. 8). What I want to do is
>reverse this process. I want to start off with the $month = 8; and then get
>a $timestamp. Does anyone know if and how you can do this?
>
>$month = 8;
>$timestamp = time($month); //???? this isn't how you do this
> //but I don't have a clue how you would
>do it...
>
>Thanks,
>Jay Paulson