Skip to content

Commit

Permalink
Revert "src: make process.env.TZ setter clear tz cache"
Browse files Browse the repository at this point in the history
This reverts commit 1d1ab76.

PR-URL: #20228
Fixes: #20227
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
BridgeAR committed Apr 23, 2018
1 parent 0f8caf2 commit e767aa1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
10 changes: 0 additions & 10 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h> // tzset(), _tzset()

#include <string>
#include <vector>
Expand Down Expand Up @@ -136,7 +135,6 @@ using v8::Array;
using v8::ArrayBuffer;
using v8::Boolean;
using v8::Context;
using v8::Date;
using v8::EscapableHandleScope;
using v8::Exception;
using v8::Float64Array;
Expand Down Expand Up @@ -2690,10 +2688,6 @@ static void EnvSetter(Local<Name> property,
node::Utf8Value key(info.GetIsolate(), property);
node::Utf8Value val(info.GetIsolate(), value);
setenv(*key, *val, 1);
if (key.length() == 2 && key[0] == 'T' && key[1] == 'Z') {
tzset();
Date::DateTimeConfigurationChangeNotification(info.GetIsolate());
}
#else // _WIN32
node::TwoByteValue key(info.GetIsolate(), property);
node::TwoByteValue val(info.GetIsolate(), value);
Expand All @@ -2702,10 +2696,6 @@ static void EnvSetter(Local<Name> property,
if (key_ptr[0] != L'=') {
SetEnvironmentVariableW(key_ptr, reinterpret_cast<WCHAR*>(*val));
}
if (key.length() == 2 && key[0] == L'T' && key[1] == L'Z') {
_tzset();
Date::DateTimeConfigurationChangeNotification(info.GetIsolate());
}
#endif
// Whether it worked or not, always return value.
info.GetReturnValue().Set(value);
Expand Down
23 changes: 0 additions & 23 deletions test/parallel/test-process-env-tz.js

This file was deleted.

0 comments on commit e767aa1

Please sign in to comment.