Browse Source

Merge pull request #22830 from abpframework/normalizeToString

Fix date object assignment in timezone adjustment logic
pull/22831/head
Engincan VESKE 9 months ago
committed by GitHub
parent
commit
5e7321e720
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  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