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
8
namespace
v8
{
9
namespace
base
{
10
11
class
TimezoneCache
{
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
38
enum class
TimeZoneDetection
{
kSkip
,
kRedetect
};
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_
v8::base::TimezoneCache
Definition
timezone-cache.h:11
v8::base::TimezoneCache::LocalTimezone
virtual const char * LocalTimezone(double time_ms)=0
v8::base::TimezoneCache::LocalTimeOffset
virtual double LocalTimeOffset(double time_ms, bool is_utc)=0
v8::base::TimezoneCache::DaylightSavingsOffset
virtual double DaylightSavingsOffset(double time_ms)=0
v8::base::TimezoneCache::Clear
virtual void Clear(TimeZoneDetection time_zone_detection)=0
v8::base::TimezoneCache::TimeZoneDetection
TimeZoneDetection
Definition
timezone-cache.h:38
v8::base::TimezoneCache::TimeZoneDetection::kRedetect
@ kRedetect
v8::base::TimezoneCache::TimeZoneDetection::kSkip
@ kSkip
v8::base::TimezoneCache::~TimezoneCache
virtual ~TimezoneCache()=default
base
OpIndex base
Definition
instruction-selector-ia32.cc:65
v8
Definition
api-arguments-inl.h:19
src
base
timezone-cache.h
Generated on Sun Apr 6 2025 21:08:50 for v8 by
1.12.0