bada-terminal / src /utils /batch-timezone.js
VanyaJ's picture
Release BADA Terminal v2.1.0 (Enterprise Ontology, NVIDIA auto-ontology, Release Preflight)
d739b1b verified
Raw History Blame Contribute Delete
490 Bytes
/** ์ €์žฅ ์‹œ 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 };