I'd like to return the date in this format:
2006-05-09T18:00:00-08:00
I've tried using date('c'), but that doesn't appear to be working. Is there another way that I can return the current date/time in this format?
-08:00 what does this represent ? offset?
The manual appears to say that "c" was added in PHP 5.
This appears to work as a substitute:
$offset = date('O'); $offset_hr = substr($offset, 0, 3); $offset_min = substr($offset, -2); echo date('Y-m-d\TH:i:s' . $offset_hr . ':' . $offset_min);