| 62 | |
| 63 | |
| 64 | class ScopedTimezoneBias |
| 65 | { |
| 66 | public: |
| 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 | } |
| 81 | private: |
| 82 | TIME_ZONE_INFORMATION m_tz; |
| 83 | }; |
| 84 | |
| 85 | std::string GetTestFileName() |
| 86 | { |
no outgoing calls