Skip to content

Commit

Permalink
replace UTCString with ISOString when getting timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed Feb 22, 2019
2 parents 873311b + 752cfab commit 5875dd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/utils/DateTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ class DateTime {
}

getUTCTimeStamp(dateStr) {
if (!Date.parse(dateStr)) return dateStr
return new Date(new Date(dateStr).toUTCString().substr(0, 25)).getTime()
// return new Date(new Date(dateStr).setMinutes(new Date().getTimezoneOffset()))
if (!Date.parse(dateStr)) {
return dateStr
}
return new Date(new Date(dateStr).toISOString().substr(0, 25)).getTime()
}

parseDate(dateStr) {
Expand Down
2 changes: 1 addition & 1 deletion types/apexcharts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ type ApexResponsive = {
*/
type ApexTooltip = {
enabled?: boolean;
shared?: true;
shared?: boolean;
followCursor?: boolean;
intersect?: boolean;
inverseOrder?: boolean;
Expand Down

0 comments on commit 5875dd5

Please sign in to comment.