Looks reasonable, too.

As for the ICU bug about the tz detection on Android (
https://unicode-org.atlassian.net/browse/ICU-13208), I think it has been
fixed in another bug in a recent version of ICU.  Because ICU on Android is
only updated by a new Android release and v8 embedders need to support old
versions of Android, this proposed change makes sense.

Jungshik

2020년 3월 11일 (수) 오전 8:31, Frank Tang (譚永鋒) <[email protected]>님이 작성:

>
> Dear CK
>
> Looks reasonable.
> Could you please file a bug in v8 by using
> https://bugs.chromium.org/p/v8/issues/entry w/ details
> and assign it to me (and cc [email protected] and [email protected])
> about this.
>
> Thanks
>
> Regards,
> Frank
>
> On Wed, 11 Mar 2020 at 07:44, Sathya Gunasekaran <[email protected]>
> wrote:
>
>> +Frank Yung-Fong Tang <[email protected]>
>>
>> Adding an API for this makes sense to me. Can you submit the patch using
>> gerrit? More information here: https://v8.dev/docs/contribute
>>
>> On Sat, Mar 7, 2020 at 6:19 AM <[email protected]> wrote:
>>
>>> Well, the patch should be pretty much like this.
>>>
>>> https://github.com/Kudo/v8-android-buildscripts/blob/master/patches/custom_timezone.patch
>>> Please let me know if the API change making sense or not.
>>> I could create a CL if that is okay.
>>> Thanks.
>>>
>>> [email protected]於 2020年3月4日星期三 UTC+8下午8時29分32秒寫道:
>>>>
>>>> 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/1c841e92-4341-4945-b771-d003776b77b3%40googlegroups.com
>>> <https://groups.google.com/d/msgid/v8-dev/1c841e92-4341-4945-b771-d003776b77b3%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>
> --
> Frank Yung-Fong Tang
> 譚永鋒 / 🌭🍊
> Sr. Software Engineer
>

-- 
-- 
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/CADaTyXVxGXkyxbt6h-eK-QXvsw-JRANYoB9wOQke3no4GNSv6g%40mail.gmail.com.

Reply via email to