KBD

Keith Devens .com

Friday, May 9, 2008 Flag waving
Beauty is the first test: there is no permanent place in this world for ugly mathematics. – G. H. Hardy (A Mathematician's Apology)
← DataVisionRSS auto-discovery with PHP →

Daily link icon Monday, June 3, 2002

ISO 8601 date/times

PHP's strtotime function doesn't read full ISO 8601 date/times??

← DataVisionRSS auto-discovery with PHP →

Comments XML gif

KC wrote:

GAH I KNOW.

I have been scouring google for a function that will let me do this.

I'm about to give up and write my own.

∴ KC | 30-Jul-2004 2:02am est | #5147

Keith (http://keithdevens.com/) wrote:

Actually, you can still use php's strtotime function. Just to a str_replace and replace the 'T' in the middle with a space and then parse it with strtotime.

Keith | 30-Jul-2004 2:16am est | http://keithdevens.com/ | #5148

Jacob wrote:

strtotime will fail if the iso date contains a time zone offset (+01:00 or Z at the end of the string), sure these can be removed with a "substr" but then the time will be off... this can be corrected by parsing those last 5 characters, but already it seems as simple and more reliable to write your own parser. Anyone? ...

∴ Jacob | 30-Nov-2006 7:32am est | #9802

Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

May 2008
SunMonTueWedThuFriSat
 123
45678910
11121314151617
18192021222324
25262728293031



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 5 posts

Recent comments XML

new⇒Girls, please don't get breast implants

I looked like a 12 yr old boys body​before I got mine and I cant be​happier...

Mel: May 9, 2:57pm

Javascript clone function

?!code:language=javascript

var​parent = { name : "jake", age :​"26"};

...

Jake: May 8, 10:05am

I hate ASP.NET

I am a professional developer in​the USA. My company uses me for​specifical...

David: May 5, 11:37pm

WoW Forums -> Defense after clefthoof

Yes, which is why, like it says​above, the crit cap for druids is​2.6 with ...

Keith: May 5, 4:17pm

Spider solitaire

Hello,
I'm a SS newbie, and I have​a two-suit game that I cannot beat.​Is ...

Amanda: May 4, 10:04pm

Generated in about 0.495s.

(Used 8 db queries)