@@ -59,3 +59,28 @@ test('south-increment-nov', (t) => {
5959 } )
6060 t . end ( )
6161} )
62+
63+ // oracle: native Intl offset (minutes) for a UTC instant
64+ function intlOffsetMin ( tz , utcISO ) {
65+ const v = new Intl . DateTimeFormat ( 'en-US' , { timeZone : tz , timeZoneName : 'longOffset' } )
66+ . formatToParts ( new Date ( utcISO ) )
67+ . find ( ( x ) => x . type === 'timeZoneName' ) . value // e.g. 'GMT+11:00'
68+ const m = v . match ( / G M T ( [ + - ] ) ( \d { 2 } ) : ( \d { 2 } ) / )
69+ if ( ! m ) return 0
70+ const sign = m [ 1 ] === '-' ? - 1 : 1
71+ return sign * ( + m [ 2 ] * 60 + + m [ 3 ] )
72+ }
73+
74+ test ( 'Lord Howe half-hour DST offset' , ( t ) => {
75+ const tz = 'Australia/Lord_Howe'
76+ // January = southern summer = DST on. Intl: +11:00 (660 min).
77+ const janUTC = '2026-01-15T00:00:00Z'
78+ const jan = spacetime ( new Date ( janUTC ) . getTime ( ) , tz )
79+ t . equal ( jan . offset ( ) , intlOffsetMin ( tz , janUTC ) , 'Lord Howe January offset matches Intl (+11:00)' )
80+
81+ // July = southern winter = standard. Intl: +10:30 (630 min).
82+ const julUTC = '2026-07-15T00:00:00Z'
83+ const jul = spacetime ( new Date ( julUTC ) . getTime ( ) , tz )
84+ t . equal ( jul . offset ( ) , intlOffsetMin ( tz , julUTC ) , 'Lord Howe July offset matches Intl (+10:30)' )
85+ t . end ( )
86+ } )
0 commit comments