Im struggling a lot with how I can format a NSDate to POST it as JSON to RE开发者_StackOverflowST service .net. The accepted format is:
"Date":"\/Date(459842400000+0200)\/"
I have no problem with the response and to parse it to NSDate. I use JSONFramework for parsing.
Any suggestions?
Take a look at the NSDateFormatter and NSDate classes.
From your example it looks like you want to build a string with Date(Timestamp + TimeZone)
. There are two methods that do that, timeIntervalSince1970
(NSDate
) and timeZone
(NSDateFormatter).
精彩评论