- 
                Notifications
    
You must be signed in to change notification settings  - Fork 60
 
Open
Description
From https://w3c.github.io/webdriver-bidi/#command-emulation-setTimezoneOverride:
If IsTimeZoneOffsetString(emulated timezone) returns false and AvailableNamedTimeZoneIdentifiers does not contain emulated timezone, return error with error code invalid argument.
Two issues:
AvailableNamedTimeZoneIdentifiersreturns a List of Records, so it's not clear that contain is correctly used.- ECMA-262 SystemTimeZoneIdentifier is specified to return a primary time zone identifier. The WebDriver BiDi override shouldn't violate this requirement.
 
See also ECMA-402's GetAvailableNamedTimeZoneIdentifier and AvailablePrimaryTimeZoneIdentifiers.
- If the time zone override is expected to be called with a primary time zone identifier (in the correct case), then 
AvailablePrimaryTimeZoneIdentifierscan be used. For example"America/New_York"will get accepted, but not"america/NEW_YORK"(wrong case) or"EST5EDT"(time zone link to"America/New_York".) - If 
"america/NEW_YORK"and"EST5EDT"should be accepted as time zone overrides, thenGetAvailableNamedTimeZoneIdentifiercan be used. For example: 
- If IsTimeZoneOffsetString(emulated timezone) returns false:
 
- Let timeZoneIdentifierRecord be GetAvailableNamedTimeZoneIdentifier(emulated timezone).
 - If timeZoneIdentifierRecord is empty, return error with error code invalid argument.
 - Set emulated timezone to timeZoneIdentifierRecord.[[PrimaryIdentifier]].
 
(Not sure if that's the correct syntax for W3C specs, but should be close enough.)
Metadata
Metadata
Assignees
Labels
No labels