File size: 490 Bytes
d739b1b | 1 2 3 4 5 6 7 8 9 | /** ์ ์ฅ ์ IANA ์๊ฐ๋๋ฅผ ๊ณ ์ ํ์ฌ ์ฌ์์/ํธ์คํธ ์๊ฐ๋ ๋ณ๊ฒฝ์ ์ํฅ์ ๋ฐ์ง ์๊ฒ ํ๋ค. */
function batchTimezone(value, existing) {
const timezone = value == null ? existing || Intl.DateTimeFormat().resolvedOptions().timeZone : value;
if (typeof timezone !== 'string' || !timezone) throw new Error('Batch timezone is required');
new Intl.DateTimeFormat('en-US', { timeZone: timezone }).format();
return timezone;
}
module.exports = { batchTimezone };
|