* Thus wrote Ryan A ([EMAIL PROTECTED]):
> Hi everyone,
> This "very simple" program is driving me nuts, heres what i am doing:
> 1.making a timestamp with the current time.
> 2.reading from the timestamp and trying to "render" the date again
> 
> $ryan=strtotime ("now"); echo $ryan."<br>";
> echo strftime( "%G-%m-%a %H:%M:%S", $ryan)."<br>";

You don't want to use %G for the year, there are cases where the
year will be wrong if you are using it with %m %a.

See the example 2 in strftime
http://php.net/strftime

use %Y instead.

Curt
-- 
"My PHP key is worn out"

  PHP List stats since 1997: 
          http://zirzow.dyndns.org/html/mlists/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to