Formatting a DateTime object from .NET into a NSDate for objective-c

前端 未结 3 976
野性不改
野性不改 2021-01-05 03:11

I am working with an API that returns a .NET DateTime object into my iOS application. I\'m a little confused at what\'s going on, the DateTime looks fine when it leaves the

3条回答
  •  没有蜡笔的小新
    2021-01-05 03:52

    The RestKit library has an NSDateFormatter subclass for just this. Take a look here for inspiration:

    https://github.com/RestKit/RestKit/blob/master/Code/Support/RKDotNetDateFormatter.h https://github.com/RestKit/RestKit/blob/master/Code/Support/RKDotNetDateFormatter.m

提交回复
热议问题