Re: This makes NO SENSE!!!!!
| From: | Brian Clark | Date: | Thu, 27 Dec 2001 09:22:33 +0000 |
| Subject: | Re: This makes NO SENSE!!!!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-78827@lists.php.net to get a copy of this message | ||
* Chris Cocuzzo (cuzo@mediaone.net) [Dec 27. 2001 03:16]:
> hey-
Howdy. With your previous posts on the subject, why do I get the feeling
you're building a time machine? :-)
> ok. I have the following code.
> <?php
> if($submit) {
> $arradate = explode("/",$date);
> $uxdate = mktime(0,0,0,$arradate[0],$arradate[1],$arradate[2]);
> print $uxdate;
> }
> else {
> ?>
> <form action="strtotime.php" method="POST"> //name of file is
> strtotime.php
> <input type="text" name="date" size="30">
> <input type="submit" name="submit" value="submit">
> <?
> }
> ?>
> the problem: it's printing out -1 when i submit. I know it means something
> is wrong, however I can't find an error with this when i have the following
> code below working perfectly: [sidenote]: i enter the date into the form
> field like this: 1/11/2002
OK this is strange. This works fine on my machine and I get he expected
result: 1010725200
It *appears* to be a specific OS/distribution issue, but this is where
my experience ends. I've seen weird issues like this on systems
where I also see processes suddenly appear to have spawned in the winter
of 1969.
Check out the user notes here:
<http://www.php.net/manual/en/function.mktime.php>
--
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Perl: The Swiss Army Chainsaw