我使用 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/