- Fix NSDate parsing
This commit is contained in:
parent
72d6135f67
commit
520b729123
@ -37,7 +37,7 @@ PODS:
|
||||
- NSString-Helper (1.0.5)
|
||||
- nv-ios-http-status (0.0.1)
|
||||
- PEAR-FileManager-iOS (1.3.1)
|
||||
- PNObject (1.1.0):
|
||||
- PNObject (1.1.1):
|
||||
- AFNetworking
|
||||
- CodFis-Helper
|
||||
- DDDKeychainWrapper
|
||||
@ -84,7 +84,7 @@ SPEC CHECKSUMS:
|
||||
NSString-Helper: 459e1b6a62b3bf7db10f01b0d102548608e945c4
|
||||
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
||||
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
||||
PNObject: 527e0ee690cabcb15a793a0b78336e65b126aaf5
|
||||
PNObject: f38657e6b3e643f397da970c9e454bd2991b5b94
|
||||
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
|
||||
RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109
|
||||
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "PNObject",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"summary": "PNObject is a simple replica of the more complex ParseObject",
|
||||
"homepage": "https://git.giuseppenucifora.com/giuseppenucifora/PNObject",
|
||||
"license": {
|
||||
@ -12,7 +12,7 @@
|
||||
},
|
||||
"source": {
|
||||
"git": "https://git.giuseppenucifora.com/giuseppenucifora/PNObject.git",
|
||||
"tag": "1.1.0"
|
||||
"tag": "1.1.1"
|
||||
},
|
||||
"platforms": {
|
||||
"ios": "8.0"
|
||||
|
||||
4
Example/Pods/Manifest.lock
generated
4
Example/Pods/Manifest.lock
generated
@ -37,7 +37,7 @@ PODS:
|
||||
- NSString-Helper (1.0.5)
|
||||
- nv-ios-http-status (0.0.1)
|
||||
- PEAR-FileManager-iOS (1.3.1)
|
||||
- PNObject (1.1.0):
|
||||
- PNObject (1.1.1):
|
||||
- AFNetworking
|
||||
- CodFis-Helper
|
||||
- DDDKeychainWrapper
|
||||
@ -84,7 +84,7 @@ SPEC CHECKSUMS:
|
||||
NSString-Helper: 459e1b6a62b3bf7db10f01b0d102548608e945c4
|
||||
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
||||
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
||||
PNObject: 527e0ee690cabcb15a793a0b78336e65b126aaf5
|
||||
PNObject: f38657e6b3e643f397da970c9e454bd2991b5b94
|
||||
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
|
||||
RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109
|
||||
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'PNObject'
|
||||
s.version = '1.1.0'
|
||||
s.version = '1.1.1'
|
||||
s.summary = 'PNObject is a simple replica of the more complex ParseObject'
|
||||
|
||||
|
||||
|
||||
@ -118,7 +118,13 @@
|
||||
},
|
||||
@"NSDate" : ^{
|
||||
NSString *str = [NSString stringWithFormat:@"%@", value];
|
||||
NSDate *val = [[NSDate dateFromString:str withFormat:kNSDateHelperFormatSQLDateWithTime] toLocalTime];
|
||||
NSString *dateFormat = [NSDate parseDateFormatFromString:str];
|
||||
|
||||
if (dateFormat == nil) {
|
||||
dateFormat = kNSDateHelperFormatSQLDateWithTime;
|
||||
}
|
||||
|
||||
NSDate *val = [[NSDate dateFromString:str withFormat:dateFormat] toLocalTime];
|
||||
if (![self isObjNull:val]) {
|
||||
[self setValue:val forKey:propertyName];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user