File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -150,13 +150,11 @@ function getZoneCfgSinceTime (cutoffTime, cacheFilename) {
150150 const timezoneInstance = time . Timezone . from ( zone )
151151 const currentZoneOffset = timezoneInstance . getOffsetForWallTime ( timezoneInstance )
152152 let timekeepingKey = `${ currentZoneOffset } `
153- const transitions = timezoneInstance . getAllTransitions ( )
153+ // Offset-only zones (Etc/UTC, Etc/GMT-3, etc) return null instead of an empty list
154+ const transitions = timezoneInstance . getAllTransitions ( ) || [ ]
154155
155- if ( transitions ) {
156- // timezone with transitions between daylight savings and standard time since cutoff time
157- const futureTransitionsHash = hashMd5 ( transitions . filter ( t => t . transitionTime > cutoffTime ) )
158- timekeepingKey = `${ currentZoneOffset } -${ futureTransitionsHash } `
159- }
156+ const futureTransitionsHash = hashMd5 ( transitions . filter ( t => t . transitionTime > cutoffTime ) )
157+ timekeepingKey = `${ currentZoneOffset } -${ futureTransitionsHash } `
160158
161159 if ( ! timekeepingPatternZones [ timekeepingKey ] ) {
162160 timekeepingPatternZones [ timekeepingKey ] = [ ]
You can’t perform that action at this time.
0 commit comments