The Lumber Room

"Consign them to dust and damp by way of preserving them"

Archive for November 22nd, 2005

Getting ISO 8601 format time on PHP boards

leave a comment »

Try Y-m-d H:i:s O. It always shows the timezone offset as +0000, though. The only fix I’ve found for this is to actually hard code the timezone — I’m using Y-m-d H:i:s +0530 as the literal string for the date format on this non-blog.

The relevant pages are the PHP docs and Markus Kuhn’s page.

Written by S

Tue, 2005-11-22 at 15:13:00

Posted in compknow