Timezone detection on Android is slightly from POSIX and ICU did not well 
support this for Android.
There was an opening issue for ICU: 
https://unicode-org.atlassian.net/browse/ICU-13208

Chromium on Android, on the other hand, will call 
icu::TimeZone::adoptDefault() to setup correct timezone.
https://chromium-review.googlesource.com/c/chromium/src/+/512282

Unfortunately, for V8 embedders, there are no public API to setup timezone.
It will fallback to use ICU internal host timezone detection and will get 
wrong result on Android.

Hopefully to add a public API in v8.h for embedders to setup default 
timezone.
The API could probably to add in existing 
`DateTimeConfigurationChangeNotification`.
With new TimeZoneDetection::kCustom and maybe a second string parameter to
`DateTimeConfigurationChangeNotification` for the custom timezone.

What steps will reproduce the problem?
1. Setup a V8 embedder application on Android.
2. Setup Android device's timezone to Australia/Sydney.
3. `console.log(new Date().toString())` or 
`console.log(Intl.DateTimeFormat().resolvedOptions().timeZone)`

What is the expected output?
console.log(new Date().toString()) expects get GMT+11:00 right now for 
daylight saving.
console.log(Intl.DateTimeFormat().resolvedOptions().timeZone) expects to 
get 'Australia/Sydney'.

What do you see instead?
console.log(new Date().toString()) got GMT+10:00
console.log(Intl.DateTimeFormat().resolvedOptions().timeZone) got undefined

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/656c34d1-517f-4d82-9ed6-79e0d1080552%40googlegroups.com.

Reply via email to