Skip to content

Commit 5ad2802

Browse files
committed
Fix DateTimeFormat configuration. hourCycle: 'h23' doesn't work in older Node versions
1 parent 7510c9c commit 5ad2802

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/bolt-connection/src/bolt/bolt-protocol-v5x0.utc.transformer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ function getTimeInZoneId (timeZoneId, epochSecond, nano) {
167167
hour: 'numeric',
168168
minute: 'numeric',
169169
second: 'numeric',
170-
hourCycle: 'h23',
170+
hour12: false,
171171
timeZoneName: 'short'
172172
})
173173

@@ -207,6 +207,8 @@ function getTimeInZoneId (timeZoneId, epochSecond, nano) {
207207
return obj
208208
}, {})
209209

210+
localDateTime.hour = localDateTime.hour.modulo(24)
211+
210212
return localDateTime
211213
}
212214

0 commit comments

Comments
 (0)