MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / ScopedTimezoneBias

Class ScopedTimezoneBias

DebugView++Test/DebugView++Test.cpp:64–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62
63
64class ScopedTimezoneBias
65{
66public:
67 ScopedTimezoneBias(LONG Bias)
68 {
69 Win32::SetPrivilege(SE_TIME_ZONE_NAME, true);
70 GetTimeZoneInformation(&m_tz);
71 TIME_ZONE_INFORMATION tz = m_tz;
72 tz.Bias = Bias;
73 SetTimeZoneInformation(&tz);
74 }
75
76 ~ScopedTimezoneBias()
77 {
78 SetTimeZoneInformation(&m_tz);
79 Win32::SetPrivilege(SE_TIME_ZONE_NAME, false);
80 }
81private:
82 TIME_ZONE_INFORMATION m_tz;
83};
84
85std::string GetTestFileName()
86{

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls

no outgoing calls

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68