The recommended way is still to call
v8::Date::DateTimeConfigurationChangeNotification() after TZ change.

Without the call it is not guaranteed that V8 will pick the TZ change.

Cheers,
Ulan.

On Fri, Jan 29, 2016 at 7:38 PM Bogdan Padalko <[email protected]>
wrote:

> Hi, after upgrading to latest v8 from master (say, v4.10.43) on linux
> (ubuntu 15.10) and os x (10.11.3) changing timezone with
> putennv("TZ=<timezone>") (
> http://man7.org/linux/man-pages/man3/putenv.3.html) new timezone affects
> v8 runtime without calling
> v8::Date::DateTimeConfigurationChangeNotification. I guess it happens after
> "[runtime] Migrate several Date builtins to C++" (
> https://github.com/v8/v8/commit/065e9c536f14b3d7cb4d140c6f74e024e31ee1a2)
> commit.
>
>
>
> Here is some meta-code to demonstrate problem:
>
>
> putenv("TZ=America/New_York");
> v8::Date::DateTimeConfigurationChangeNotification();
> v8::MaybeLocal<v8::Date> date = v8::Date::New(context, 1445444940000.0).
> ToLocalChecked();
>
> date.ToLocalChecked()->ToString(context); // Wed Oct 21 2015 09:29:00
> GMT-0700 (EDT)
>
> putenv("TZ=UTC");
> date.ToLocalChecked()->ToString(context); // Wed Oct 21 2015 09:29:00
> GMT-0700 (UTC)
>
>
>
> before (apr. that changes I mentioned above) both ToString() returned EDT
> time.
>
> Based on  this, I have few questions:
>
>    1. How now TZ changes handled internally, if any?
>    2. What is recommended way to handle TZ changes?
>    3. Is using v8::Date::DateTimeConfigurationChangeNotification() still
>    mandatory to notify TZ changes?
>
> --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to