system.kanoa.date.getTimezoneOffsets(timezones, startDate, endDate)
Returns a dictionary of offset minutes for the start and end date for a given list of timezones i.e ['Pacific Standard Time'] This function is used by the shift and operations scheduling to determine if we are looking at a period of time where daylight savings changes
Parameters
timezones List of Strings: i.e. ['Pacific Standard Time']
startDate DateTime: Start date of range
endDate DateTime: End date of range
Returns
timezoneDict Dictionary
- timezone String
- startOffSetMins DateTime
- endOffSetMins DateTime
Example
startDate = system.date.parse("2025-01-01 00:00:00")
endDate = system.date.parse("2025-02-01 00:00:00")
timezones = system.kanoa.date.getTimeZoneOffsets(['Pacific Standard Time'], startDate, endDate)