v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
timezone-cache.h
Go to the documentation of this file.
1// Copyright 2017 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_BASE_TIMEZONE_CACHE_H_
6#define V8_BASE_TIMEZONE_CACHE_H_
7
8namespace v8 {
9namespace base {
10
12 public:
13 // Short name of the local timezone (e.g., EST)
14 virtual const char* LocalTimezone(double time_ms) = 0;
15
16 // ES #sec-daylight-saving-time-adjustment
17 // Daylight Saving Time Adjustment
18 virtual double DaylightSavingsOffset(double time_ms) = 0;
19
20 // ES #sec-local-time-zone-adjustment
21 // Local Time Zone Adjustment
22 //
23 // https://github.com/tc39/ecma262/pull/778
24 virtual double LocalTimeOffset(double time_ms, bool is_utc) = 0;
25
39
40 // Called when the local timezone changes
41 virtual void Clear(TimeZoneDetection time_zone_detection) = 0;
42
43 // Called when tearing down the isolate
44 virtual ~TimezoneCache() = default;
45};
46
47} // namespace base
48} // namespace v8
49
50#endif // V8_BASE_TIMEZONE_CACHE_H_
virtual const char * LocalTimezone(double time_ms)=0
virtual double LocalTimeOffset(double time_ms, bool is_utc)=0
virtual double DaylightSavingsOffset(double time_ms)=0
virtual void Clear(TimeZoneDetection time_zone_detection)=0
virtual ~TimezoneCache()=default