Revision 13bc2a4e
b/asi-http-request-with-pithos/Classes/Pithos/ASIPithosAccountRequest.m | ||
---|---|---|
250 | 250 |
} else if ([elementName isEqualToString:@"bytes"]) { |
251 | 251 |
currentContainer.bytes = [currentContent intValue]; |
252 | 252 |
} else if ([elementName isEqualToString:@"last_modified"]) { |
253 |
currentContainer.lastModified = [[self dateFormatterWithFormatId:0] dateFromString:currentContent]; |
|
253 |
currentContainer.lastModified = [[self dateFormatterWithFormatId:0] dateFromString: |
|
254 |
[currentContent stringByReplacingOccurrencesOfString:@":" |
|
255 |
withString:@"" |
|
256 |
options:NSBackwardsSearch |
|
257 |
range:NSMakeRange(([currentContent length] - 3), 1)]]; |
|
254 | 258 |
} else if ([elementName isEqualToString:@"x_container_until_timestamp"]) { |
255 | 259 |
currentContainer.untilTimestamp = [NSDate dateWithTimeIntervalSince1970:[currentContent intValue]]; |
256 | 260 |
} else if ([elementName rangeOfString:@"x_container_policy_"].location == 0) { |
b/asi-http-request-with-pithos/Classes/Pithos/ASIPithosContainerRequest.m | ||
---|---|---|
382 | 382 |
} else if ([elementName isEqualToString:@"content_disposition"]) { |
383 | 383 |
currentObject.contentDisposition = currentContent; |
384 | 384 |
} else if ([elementName isEqualToString:@"last_modified"]) { |
385 |
currentObject.lastModified = [[self dateFormatterWithFormatId:0] dateFromString:currentContent]; |
|
385 |
currentObject.lastModified = [[self dateFormatterWithFormatId:0] dateFromString: |
|
386 |
[currentContent stringByReplacingOccurrencesOfString:@":" |
|
387 |
withString:@"" |
|
388 |
options:NSBackwardsSearch |
|
389 |
range:NSMakeRange(([currentContent length] - 3), 1)]]; |
|
386 | 390 |
} else if ([elementName isEqualToString:@"x_object_version"]) { |
387 | 391 |
currentObject.version = currentContent; |
388 | 392 |
} else if ([elementName isEqualToString:@"x_object_version_timestamp"]) { |
b/asi-http-request-with-pithos/Classes/Pithos/ASIPithosRequest.m | ||
---|---|---|
254 | 254 |
if ([elementName isEqualToString:@"name"]) { |
255 | 255 |
currentAccount.name = currentContent; |
256 | 256 |
} else if ([elementName isEqualToString:@"last_modified"]) { |
257 |
currentAccount.lastModified = [[self dateFormatterWithFormatId:0] dateFromString:currentContent]; |
|
257 |
currentAccount.lastModified = [[self dateFormatterWithFormatId:0] dateFromString: |
|
258 |
[currentContent stringByReplacingOccurrencesOfString:@":" |
|
259 |
withString:@"" |
|
260 |
options:NSBackwardsSearch |
|
261 |
range:NSMakeRange(([currentContent length] - 3), 1)]]; |
|
258 | 262 |
} else if ([elementName isEqualToString:@"account"]) { |
259 | 263 |
[sharingAccounts addObject:currentAccount]; |
260 | 264 |
self.currentAccount = nil; |
... | ... | |
279 | 283 |
if (dateFormatter == nil) { |
280 | 284 |
switch (formatId) { |
281 | 285 |
case 0: |
282 |
// date format: 2009-11-04T19:46:20.192723
|
|
286 |
// date format: 2009-11-04T19:46:20.19+0000
|
|
283 | 287 |
// Needed for last_modified |
284 | 288 |
dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; |
285 | 289 |
[dateFormatter setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"] autorelease]]; |
286 |
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss"]; |
|
290 |
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"];
|
|
287 | 291 |
[threadDict setObject:dateFormatter forKey:dateFormatterKey]; |
288 | 292 |
break; |
289 | 293 |
case 1: |
Also available in: Unified diff