Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

NSDateTimeFormatter with GMT timezone

I have used NSDateTimeFormatter to convert NSDate to NSString with "yyyy-MM-dd'T'HH:mm:ssZZZZZ" this format. Here ZZZZZ mentions timezone offset in +/-HH:mm format. But for GMT timezone alone it returns "Z" for other timezones it is working (+05:30). Any help?

Posted on Dec 17, 2017 11:10 PM

Reply
Question marked as Best reply

Posted on Dec 18, 2017 9:30 PM

The solitary "Z" is shorthand for +00:00 which is Universal Coordinated Time (UTC) at Greenwich England where there is no time zone offset. The following PyObjC code forces a given file modification date-time to the UTC zero offset to avoid dealing with time zones. It returns ... 2017-12-01T13:59:51Z, where my ordinary time zone offset is -0500.


User uploaded file

2 replies
Question marked as Best reply

Dec 18, 2017 9:30 PM in response to Pavithra_93

The solitary "Z" is shorthand for +00:00 which is Universal Coordinated Time (UTC) at Greenwich England where there is no time zone offset. The following PyObjC code forces a given file modification date-time to the UTC zero offset to avoid dealing with time zones. It returns ... 2017-12-01T13:59:51Z, where my ordinary time zone offset is -0500.


User uploaded file

NSDateTimeFormatter with GMT timezone

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.