Tiene problemas para convertir este NSString a NSDate [duplicado]
Frecuentes
Visto 136 veces
0
Posible duplicado:
¿Existe una forma sencilla de convertir una marca de tiempo ISO8601 en un NSDate formateado?
I can't convert this NSString to an NSDate: 2010-03-06T10:06:00-05:00
To be honest, I can not decipher the Unicode docs, where they talk about generic wall time , standard/daylight time, offsets from GMT as a fallback, etc.
To show that I have made a decent effort, here is what I have as the dateformatter: yyyy-MM-dd'T'HH:mm:ssZZ:ZZ"
If I strip out the timezone such that the date becomes 2010-03-06T10:06:00
then I know what to do. But how many letter "Z"s do I need, and are they upper case? Should I be removing the colon from the -05:00 ? The timezone has been my achilles heel with these conversions.
¿Podría alguien ayudarme?
¡Gracias!
1 Respuestas
1
Echa un vistazo a esto ISO 8601 date formatter y mira si eso funciona para ti.
Respondido 25 ago 12, 05:08
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas ios nsdate iso8601 or haz tu propia pregunta.
stackoverflow.com/questions/2201216/… - user798719
stackoverflow.com/questions/2201216/… seems to be the same question. - user798719