Browse Source

Fix date object assignment in timezone adjustment logic

pull/22830/head
maliming 1 year ago
parent
commit
808a4a5b2a
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 2
      npm/packs/core/src/abp.js

2
npm/packs/core/src/abp.js

@ -778,7 +778,7 @@ var abp = abp || {};
var formattedDate = now.toLocaleString('en-US', { timeZone: timeZone, timeZoneName: 'longOffset' });
var match = formattedDate.match(/GMT([+-]\d+)/);
var targetOffsetHours = match ? parseInt(match[1], 10) : 0;
var dateObj = new Date(dateObj.getTime() - (targetOffsetHours * 60 * 60 * 1000));
dateObj = new Date(dateObj.getTime() - (targetOffsetHours * 60 * 60 * 1000));
addZulu = true;
}

Loading…
Cancel
Save