我怎么说我现在在东部地区的UTC是多少 [英] How do I say what is the current UTC in eastern zone

查看:73
本文介绍了我怎么说我现在在东部地区的UTC是多少的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论使用什么服务器,我都希望有一种方法能够获取东部UTC时间。我在系统中的所有时间戳记均为est设置,但我的Azure服务器设置为UTC,但我的本地dev box和暂存站点在est上,最好的方法是什么?谢谢你的帮助。

No matter what server is being used, I want a way to be able to just get the Eastern UTC time. All my timestamps in the system is setup for est, but my Azure server is set to UTC, but my local dev box and staging site is on est. What is the best way? Thanks for any help.

var estZone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time");
var utcTime = TimeZoneInfo.ConvertTimeToUtc(DateTime.Now, estZone);


推荐答案

UTC是UTC。到处都是一样。

UTC is UTC. It is the same everywhere.

这篇关于我怎么说我现在在东部地区的UTC是多少的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆