The Lumber Room

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

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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: