Nirav
Nirav

Reputation: 315

NSDate from timestamp

I have a string which I get from web-service response as "/Date(1366174800000-0500)/".

I want to convert the given string to NSDate with proper time stamp.

I am able to convert the 1366174800000(milliseconds) to NSDate using timeIntervalSince1970 API from apple, but I am not sure about the -500 appearing in the string.

Can somebody provide docs/examples for the same?

Regards,

Nirav

Upvotes: 0

Views: 161

Answers (1)

GoZoner
GoZoner

Reputation: 70165

-500 is the timezone. That is 5 hours, 0 minutes before GMT (which is normally Atlantic/Boston, aka ET).

Upvotes: 1

Related Questions