Skip to content

Commit

Permalink
hotfix for GMT conversion (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
rvalim authored Feb 24, 2021
1 parent c615826 commit a3a375e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/src/Helpers/JSONParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ namespace Helper {
const leaf = binding.shift();

if (object[leaf] !== undefined) {
object[leaf] = (object[leaf] as Date).toISOString().substr(0, 10);
const dt = (object[leaf] as Date);
object[leaf] = new Date(dt.getTime() - dt.getTimezoneOffset() * 60000)
.toISOString()
.substr(0, 10);
}
}
}
Expand Down

0 comments on commit a3a375e

Please sign in to comment.