Skip to content

Commit

Permalink
Date adjustments the final frontier
Browse files Browse the repository at this point in the history
  • Loading branch information
Rentacookie committed Oct 23, 2024
1 parent 75386d6 commit fee7f19
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/datetime_decode.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exports.getDate = function (
date
) {
if (!useDateStringsForType(dateStrings, 'DATE')) {
return new Date(year, jsMonthFromMysqlMonth(month), date);
return new Date(Date.UTC(year, jsMonthFromMysqlMonth(month), date));
}
return getDateString(year, month, date);
};
Expand All @@ -66,13 +66,7 @@ exports.getDateTime = function (
) {
if (!useDateStringsForType(dateStrings, 'DATETIME')) {
return new Date(
year,
jsMonthFromMysqlMonth(month),
date,
hour,
minute,
second,
fraction ? fraction.milliseconds : 0
Date.UTC(year, jsMonthFromMysqlMonth(month), date, hour, minute, second, fraction ? fraction.milliseconds : 0)
);
}
return (
Expand Down

0 comments on commit fee7f19

Please sign in to comment.