Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does plaintext NSDate work?

Tags:

iphone

nsdate

I put it into a plist and got this in plain text view:

2010-11-03T16:37:09Z

So my "guess" is:

2010-11-03 => 3rd Nov 2010

T => time(?)

16:37:09 => 4.37:09PM

Z => ? no idea

I want to recreate this in a php file that outputs a time and date? Just want to make sure if I just copy the same as above but leave the T and Z it will work?

Thanks

like image 342
Thomas Clayson Avatar asked Nov 19 '25 06:11

Thomas Clayson


1 Answers

That is ISO 8601 formatting (UTC, Combined):

http://en.wikipedia.org/wiki/ISO_8601

You can use NSDateFormatter (iOS) or date_format/date (PHP) to reformat the date before using it.

like image 74
Evan Mulawski Avatar answered Nov 21 '25 20:11

Evan Mulawski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!