Browse Source

【综合】日期兼容优化

niehaoyu 10 months ago
parent
commit
8eab1bfe1a

+ 2 - 0
PDF Office/PDF Master/Class/Purchase/DMG/Verification/VerificationManager/AIInfoManager.m

@@ -467,6 +467,7 @@ static AIInfoManager *__Manager = nil;
     
     if (self.infoDict[@"start_date"]) {
         NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
+        [formatter setLocale:[NSLocale systemLocale]];
         [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
         self.startDate = [formatter dateFromString:self.infoDict[@"start_date"]] ?: [[NSDate alloc] initWithTimeIntervalSince1970:0];
     } else {
@@ -474,6 +475,7 @@ static AIInfoManager *__Manager = nil;
     }
     if (self.infoDict[@"end_date"]) {
         NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
+        [formatter setLocale:[NSLocale systemLocale]];
         [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
         self.endDate = [formatter dateFromString:self.infoDict[@"end_date"]] ?: [[NSDate alloc] initWithTimeIntervalSince1970:0];
     } else {