gpt4 book ai didi

c# - UTC 偏移量(以分钟为单位)

转载 作者:可可西里 更新时间:2023-11-01 08:31:39 24 4
gpt4 key购买 nike

如何获取本地时间和 UTC 时间之间的分钟数差异(在 C# 中)?

最佳答案

使用TimeZoneInfo :

TimeSpan delta = TimeZoneInfo.Local.GetUtcOffset();
double utcMinuteOffset = delta.TotalMinutes;

关于c# - UTC 偏移量(以分钟为单位),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8993654/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com