|
@@ -469,8 +469,7 @@
|
|
|
}
|
|
|
|
|
|
- (NSString *)stringWithFormat:(NSString *)format {
|
|
|
- NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init];
|
|
|
- outputFormatter.timeZone = [NSTimeZone systemTimeZone];
|
|
|
+ NSDateFormatter *outputFormatter = [NSObject getDateformatter];
|
|
|
[outputFormatter setDateFormat:format];
|
|
|
|
|
|
NSString *retStr = [outputFormatter stringFromDate:self];
|
|
@@ -479,8 +478,7 @@
|
|
|
}
|
|
|
|
|
|
+ (NSDate *)dateWithString:(NSString *)string dateFormat:(NSString *)format {
|
|
|
- NSDateFormatter *inputFormatter = [[NSDateFormatter alloc] init];
|
|
|
- inputFormatter.timeZone = [NSTimeZone systemTimeZone];
|
|
|
+ NSDateFormatter *inputFormatter = [NSObject getDateformatter];
|
|
|
[inputFormatter setDateFormat:format];
|
|
|
|
|
|
NSDate *date = [inputFormatter dateFromString:string];
|