File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const dateFormat = 'YYYY-MM-DD';
6
6
const dateTimeFormat = 'YYYY-MM-DDThh:mm:ssZ' ;
7
7
8
8
function formatDate ( date ) {
9
- const parsedDate = moment ( date ) ;
9
+ const parsedDate = moment . parseZone ( date ) ;
10
10
if ( ! parsedDate . isValid ( ) ) {
11
11
logger . warn ( `Invalid date provided: ${ date } . Provided value will be used.` ) ;
12
12
return date ; // Use the provided date rather than 'Invalid date'
@@ -16,7 +16,7 @@ function formatDate(date) {
16
16
}
17
17
18
18
function formatDateTime ( date ) {
19
- const parsedDate = moment ( date ) ;
19
+ const parsedDate = moment . parseZone ( date ) ;
20
20
if ( ! parsedDate . isValid ( ) ) {
21
21
logger . warn ( `Invalid date provided: ${ date } . Provided value will be used.` ) ;
22
22
return date ; // Use the provided date rather than 'Invalid date'
You can’t perform that action at this time.
0 commit comments