问题描述
目前,我将服务器时间作为应用程序的默认时间.现在,如果我在任何其他国家/地区启动该应用程序,则通过指定国家/地区名称,我想发回该特定国家/地区的GMT时间,而不是服务器时所在国家/地区的时间.
请任何人提供代码.
问候,
桑蒂亚(R.Santhya)
我已经尝试过,我可以通过使用区域时间来获取服务器时间和当前国家/地区的GMT时间,并且我已经尝试过,可以获取中欧时间和东欧时间.如果我想通过zoneid尝试输入特定的国家/地区名称,则无法这样做.
字符串zoneId =欧洲中部标准时间";
TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById(zoneId);
Hi,
Currently i''m taking Server time as default in an application. Now if i launch the application in any other country, by specifying the country name, i want to send back that particular country''s GMT time , instead of server moment country''s time.
Kindly anybody give the code.
Regards,
R.Santhya
I have already tried, that i can able to take the server time and current country GMT time by using the zone time, as well as i have tried that, i can able get Central European Time, and Eastern European Time. If i want to try for particular country name by as zoneid , i cant to do so.
string zoneId = "Central European Standard Time";
TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById(zoneId);
推荐答案
这篇关于GMT时间而不是服务器时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!