c++ - Windows UTC 时间与夏令时无关吗?

标签 c++ winapi time utc dst

我使用 GetSystemTime 从 Windows 服务应用程序获取要在内部使用的当前 UTC 时间API。但我很好奇,该 API 返回的时间与夏令时无关吗?

PS。让我解释一下我的意思。比如说,我调用 GetSystemTime,它返回 01:59:00 AM,夏令时应该在凌晨 2 点生效。然后,我会在 2 分钟后(夏令时更改后)再次调用此 API。第二个结果是否会与第一个结果相隔 2 分钟,还是会反射(reflect)夏令时更改?

最佳答案

UTC 是... UTC

Daylight saving
UTC does not change with a change of seasons, but local time or civil time may change if a time zone jurisdiction observes daylight saving time (summer time). For example, UTC is five hours ahead of (that is, later in the day than) local time on the east coast of the United States during winter, but four hours ahead while daylight saving is observed there.

您的本地时间是一个偏移量,夏令时(这是一种本地现象)只会改变偏移量

关于c++ - Windows UTC 时间与夏令时无关吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13897505/

相关文章:

windows - Win32 ShellEx StorageHandler 的任何文档?

c++ - 来自 cppreference 的用户定义的 const char* 文字示例

c++ - delete[] 触发断点

c - 键盘模拟失败

winapi - WMI 与 Windows API

php - PHP、日期、MySQL 中的时区...?

Excel字符串转时间格式

python - 计算特定操作后耗时

c++ - C/C++ 和 CUDA 中的双线性插值

c++ - 将二进制分配给 vector C++