소스 검색

Update regular expression to include more types of dates

arvid-e 11 달 전
부모
커밋
da6e8f776b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      apps/app/src/utils/axios.ts

+ 1 - 1
apps/app/src/utils/axios.ts

@@ -6,7 +6,7 @@ import qs from 'qs';
 // eslint-disable-next-line no-restricted-imports
 export * from 'axios';
 
-const isoDateRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$/;
+const isoDateRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?(Z|[+-]\d{2}:\d{2})$/;
 
 export function convertDateStringsToDates(data: any): any {
   if (typeof data !== 'object' || data === null) {