MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / AdjustFromTimezone

Method AdjustFromTimezone

Sources/Shared/Containers/DateTime.cpp:1328–1338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1326 }
1327
1328 void DateTime::AdjustFromTimezone(TimeZone tz, bool noDST) noexcept
1329 {
1330 std::int32_t secDiff = Implementation::GetTimeZone() + tz.GetOffset();
1331 std::int32_t bias = 0;
1332
1333 if (!tz.IsLocal() && !noDST && Implementation::IsDST(*this, bias)) {
1334 secDiff -= bias;
1335 }
1336
1337 _time -= secDiff * 1000; // To milliseconds
1338 }
1339
1340#if defined(DEATH_TARGET_WINDOWS)
1341 struct _SYSTEMTIME DateTime::ToWin32() const noexcept

Callers 2

TryParseFormatFunction · 0.80
FromTimezoneMethod · 0.80

Calls 4

GetTimeZoneFunction · 0.85
IsDSTFunction · 0.85
IsLocalMethod · 0.80
GetOffsetMethod · 0.45

Tested by

no test coverage detected