RE: [PHP-WIN] Bug in mktime-function ?
| From: | Ignatius Teo | Date: | Wed, 14 Feb 2001 23:01:24 +0000 |
| Subject: | RE: [PHP-WIN] Bug in mktime-function ? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-5567@lists.php.net to get a copy of this message | ||
Er...does this mean that those of us born before the advent of Unix don't exist? :-)
Ignatius
> -----Original Message-----
> From: Pablo Vera [mailto:pvz@vercan.com]
> Sent: Thursday, 15 February 2001 04:30
> To: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] Bug in mktime-function ?
>
>
> Dirk:
>
> Date/time values in PHP are handled as UNIX timestamps, that is, the
> number of seconds since what they call the UNIX Epoch (whatever it
> means), in other words, 1970. Before that, nothing existed, so no
> need for time.
>
> Saludos,
> Pablo
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> Wednesday, February 14, 2001, 10:29:36 AM, Dirk wrote:
>
>
> DDdc> Hello PHP-users,
>
> DDdc> given the following code snippet to convert
> ISO-date-strings to localized
> DDdc> date-strings:
>
> DDdc> <?php
>
> DDdc> $stringArray = explode("-", "1985-01-01");
> DDdc> $month = $stringArray[1];
> DDdc> $day = $stringArray[2];
> DDdc> $year = $stringArray[0];
>
> DDdc> $date = mktime(0,0,0,$month,$day,$year);
> DDdc> $value = strftime("%d.%m.%Y", $date);
>
> DDdc> echo $value;
> ?>>
>
> DDdc> This code works fine as long as I use dates after 1970,
> all earlier
> DDdc> dates result in an empty value.
> DDdc> According to the docs, mktime is supposed to work fine
> with 4-digit
> DDdc> dates.
>
> DDdc> What is the problem here...
>
> DDdc> Greetings,
>
> DDdc> Dirk
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>