Re: Need someones help on a "invalid date" error.
Hi,
Your function does not tell us what date you have in the
sitemap, since the date depends on the argument of
your function, $int_date.
As John said, maybe give the URL of your sitemap,
also try with a date previous to the current date,
to account for a worse case scenario for the time zone.
For us, rusty-ish in PHP, the manual page for
the date function is at
http://uk.php.net/manual/en/function.date.php
Happy New Year everyone (everyone that reads
this group at this time of year)
Hordor@gmail.com wrote:
> I've got my site map setup and ready to go but I'm getting an "invalid
> date" response on the sitemaps page. Here is how my sitemap loads
> dates:
>
> function get_iso_8601_date($int_date)
> {
> $date_mod = date('Y-m-d\TH:i:s', $int_date);
> $pre_timezone = date('O', $int_date);
> $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone,
> 3, 2);
> $date_mod .= $time_zone;
> return $date_mod;
> }
>
> Why doesn't this work? If there's a fix for this someone please post it
> here.
0 Comments:
Yorum Gönder
<< Home