date-fns-timezone
date-fns-timezone copied to clipboard
Does this library considers day light saving for time zones?
It does.
You can also test this yourself, something like this
const { convertToTimeZone } = require('date-fns-timezone')
convertToTimeZone("2019-08-01T03:14:00Z", {timeZone: "US/Pacific"}) + ""
// 'Wed Jul 31 2019 20:14:00 GMT-0700 (Pacific Daylight Time)'
convertToTimeZone("2019-12-01T03:14:00Z", {timeZone: "US/Pacific"}) + ""
// 'Sat Nov 30 2019 19:14:00 GMT-0800 (Pacific Standard Time)'
Notice the Daylight/Standard differences as well as the difference in offset hours whether it's daylight saving time or not.