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

Function IsDST

Sources/Shared/Containers/DateTime.cpp:104–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102 }
103
104 static bool IsDST(DateTime date, std::int32_t& bias) noexcept
105 {
106 time_t timet = date.GetTicks();
107 if (timet == (time_t)-1) {
108 return false;
109 }
110
111 struct tm temp;
112 tm* tm = GetLocalTm(&timet, &temp);
113 if (tm == nullptr || !tm->tm_isdst) {
114 return false;
115 }
116
117//#if defined(DEATH_TARGET_WINDOWS) && defined(_UCRT)
118// long dstbias = 0;
119// _get_dstbias(&dstbias);
120// bias = dstbias;
121//#else
122 bias = DST_OFFSET;
123//#endif
124 return true;
125 }
126
127 static std::int32_t GetTimeZone() noexcept
128 {

Callers 2

AdjustToTimezoneMethod · 0.85
AdjustFromTimezoneMethod · 0.85

Calls 2

GetLocalTmFunction · 0.85
GetTicksMethod · 0.80

Tested by

no test coverage detected