Fix test/FetchTypeHandler.js for Timezone changes

This commit is contained in:
Sharad Chandran R 2023-05-23 20:53:09 +05:30
parent 73e616f335
commit 8167e4605d
1 changed files with 3 additions and 3 deletions

View File

@ -249,9 +249,9 @@ describe('271. fetchTypeHandler.js', function() {
oracledb.fetchTypeHandler = function(metadata) {
if (metadata.dbType === oracledb.DB_TYPE_DATE) {
const myConverter = (v) => {
const year = v.getUTCFullYear();
const month = ("0" + (v.getUTCMonth() + 1)).slice(-2); // Add leading zero if needed
const day = ("0" + v.getUTCDate()).slice(-2); // Add leading zero if needed
const year = v.getFullYear();
const month = ("0" + (v.getMonth() + 1)).slice(-2); // Add leading zero if needed
const day = ("0" + v.getDate()).slice(-2); // Add leading zero if needed
const formattedDate = `${year}-${month}-${day}`;
return formattedDate;
};