C# ——获取各国时间
DateTime dt = TimeZoneInfo.ConvertTimeToUtc(DateTime.Now, TimeZoneInfo.Local);
DateTime dt1 = TimeZoneInfo.ConvertTimeFromUtc(dt, TimeZoneInfo.FindSystemTimeZoneById("New Zealand Standard Time"));//参数对应国家或者时区 下面有相关国家和时区对应参数
MessageBox.Show("本地当前时间:" + DateTime.Now.ToString()+"\r\n"+ "UTC :" + dt.ToString() + "\r\n" + "新西兰当前:" + dt1.ToString());
/*
Dateline Standard Time,(GMT-12:00)日界线西,国际日期变更线标准时间
Samoa Standard Time,(GMT-11:00) 中途岛,萨摩亚群岛,萨摩亚群岛标准时间
Hawaiian Standard Time,(GMT-10:00) 夏威夷,夏威夷标准时间
Alaskan Standard Time,(GMT-09:00) 阿拉斯加,阿拉斯加标准时间
Pacific Standard Time,(GMT-08:00) 太平洋时间(美国和加拿大);蒂华纳,太平洋标准时间
US Mountain Standard Time,(GMT-07:00) 亚利桑那,美国山地标准时间
Mountain Standard Time,(GMT-07:00) 山地时间(美国和加拿大),山地标准时间
Mexico Standard Time 2,(GMT-07:00)奇瓦瓦,拉巴斯,马扎特兰,墨西哥标准时间 2
Central America Standard Time,(GMT-06:00) 中美洲,中美洲标准时间
Central Standard Time,(GMT-06:00) 中部时间(美国和加拿大),中部标准时间
Canada Central Standard Time,(GMT-06:00) 萨斯喀彻温,加拿大中部标准时间
Mexico Standard Time,(GMT-06:00)瓜达拉哈拉,墨西哥城,蒙特雷,墨西哥标准时间
Eastern Standard Time,(GMT-05:00) 东部时间(美国和加拿大),东部标准时间
US Eastern Standard Time,(GMT-05:00) 印地安那州(东部),美国东部标准时间
SA Pacific Standard Time,(GMT-05:00) 波哥大,利马,基多,南美州太平洋标准时间
SA Western Standard Time,(GMT-04:00) 加拉加斯,拉巴斯,南美州西部标准时间
Pacific SA Standard Time,(GMT-04:00) 圣地亚哥,南美州太平洋标准时间
Atlantic Standard Time,(GMT-04:00) 大西洋时间(加拿大),大西洋标准时间
Newfoundland Standard Time,(GMT-03:30) 纽芬兰,纽芬兰标准时间
E. South America Standard Time,(GMT-03:00) 巴西利亚,南美州东部标准时间
SA Eastern Standard Time,(GMT-03:00) 布宜诺斯艾利斯,乔治敦,南美州东部标准时间
Greenland Standard Time,(GMT-03:00) 格陵兰,格陵兰东部标准时间
Mid-Atlantic Standard Time,(GMT-02:00) 中大西洋,中大西洋标准时间
Azores Standard Time,(GMT-01:00) 亚速尔群岛,亚速尔群岛标准时间
Cape Verde Standard Time,(GMT-01:00) 佛得角群岛,佛得角群岛标准时间
Greenwich Standard Time,(GMT) 卡萨布兰卡,蒙罗维亚,格林威治标准时间
GMT Standard Time,(GMT) 格林威治标准时间: 都柏林, 爱丁堡, 伦敦, 里斯本,格林威治标准时间
W. Central Africa Standard Time,(GMT+01:00) 中非西部,中非西部标准时间
Romance Standard Time,(GMT+01:00) 布鲁塞尔,哥本哈根,马德里,巴黎,罗马标准时间
Central European Standard Time,(GMT+01:00) 萨拉热窝,斯科普里,华沙,萨格勒布,中欧标准时间
Central Europe Standard Time,(GMT+01:00) 贝尔格莱德,布拉迪斯拉发,布达佩斯,卢布尔雅那,布拉格,中欧标准时间
W. Europe Standard Time,(GMT+01:00) 阿姆斯特丹,柏林,伯尔尼,罗马,斯德哥尔摩,维也纳,西欧标准时间
South Africa Standard Time,(GMT+02:00) 哈拉雷,比勒陀利亚,南非标准时间
E. Europe Standard Time,(GMT+02:00) 布加勒斯特,东欧标准时间
Egypt Standard Time,(GMT+02:00) 开罗,埃及标准时间
Israel Standard Time,(GMT+02:00) 耶路撒冷,耶路撒冷标准时间
FLE Standard Time,(GMT+02:00) 赫尔辛基,基辅,里加,索非亚,塔林,维尔纽斯,FLE 标准时间
GTB Standard Time,(GMT+02:00) 雅典,贝鲁特,伊斯坦布尔,明斯克,GTB 标准时间
E. Africa Standard Time,(GMT+03:00) 内罗毕,东非标准时间
Arabic Standard Time,(GMT+03:00) 巴格达,阿拉伯标准时间
Arab Standard Time,(GMT+03:00) 科威特,利雅得,阿拉伯标准时间
Russian Standard Time,(GMT+03:00) 莫斯科,圣彼得堡, 伏尔加格勒,俄罗斯标准时间
Iran Standard Time,(GMT+03:30) 德黑兰,伊朗标准时间
Caucasus Standard Time,(GMT+04:00) 巴库,第比利斯,埃里温,高加索标准时间
Arabian Standard Time,(GMT+04:00) 阿布扎比,马斯喀特,阿拉伯半岛标准时间
Afghanistan Standard Time,(GMT+04:30) 喀布尔,阿富汗标准时间
West Asia Standard Time,(GMT+05:00) 伊斯兰堡,卡拉奇,塔什干,西亚标准时间
Ekaterinburg Standard Time,(GMT+05:00) 叶卡捷琳堡,叶卡捷琳堡标准时间
India Standard Time,(GMT+05:30) 马德拉斯,加尔各答,孟买,新德里,印度标准时间
Nepal Standard Time,(GMT+05:45) 加德满都,尼泊尔标准时间
Sri Lanka Standard Time,(GMT+06:00) 斯里哈亚华登尼普拉,斯里兰卡标准时间
N. Central Asia Standard Time,(GMT+06:00) 阿拉木图,新西伯利亚,中亚北部标准时间
Central Asia Standard Time,(GMT+06:00) 阿斯塔纳,达卡,中亚标准时间
Myanmar Standard Time,(GMT+06:30) 仰光,缅甸标准时间
North Asia Standard Time,(GMT+07:00) 克拉斯诺亚尔斯克,北亚标准时间
SE Asia Standard Time,(GMT+07:00) 曼谷,河内,雅加达,东南亚标准时间
North Asia East Standard Time,(GMT+08:00) 伊尔库茨克,乌兰巴图,北亚东部标准时间
China Standard Time,(GMT+08:00) 北京,重庆,香港特别行政区,乌鲁木齐,中国标准时间
Taipei Standard Time,(GMT+08:00) 台北,台北标准时间
Singapore Standard Time,(GMT+08:00) 吉隆坡,新加坡,马来西亚半岛标准时间
W. Australia Standard Time,(GMT+08:00) 珀斯,澳大利亚西部标准时间
Tokyo Standard Time,(GMT+09:00) 大坂,札幌,东京,东京标准时间
Korea Standard Time,(GMT+09:00) 汉城,韩国标准时间
Yakutsk Standard Time,(GMT+09:00) 雅库茨克,雅库茨克标准时间
AUS Central Standard Time,(GMT+09:30) 达尔文,澳大利亚中部标准时间
Cen. Australia Standard Time,(GMT+09:30) 阿德莱德,澳大利亚中部标准时间
West Pacific Standard Time,(GMT+10:00) 关岛,莫尔兹比港,西太平洋标准时间
AUS Eastern Standard Time,(GMT+10:00) 堪培拉,墨尔本,悉尼,澳大利亚东部标准时间
E. Australia Standard Time,(GMT+10:00) 布里斯班,澳大利亚东部标准时间
Vladivostok Standard Time,(GMT+10:00) 符拉迪沃斯托克,符拉迪沃斯托克标准时间
Tasmania Standard Time,(GMT+10:00) 霍巴特,塔斯马尼亚岛标准时间
Central Pacific Standard Time,(GMT+11:00) 马加丹,索罗门群岛,新喀里多尼亚,太平洋中部标准时间
New Zealand Standard Time,(GMT+12:00) 奥克兰,惠灵顿,新西兰标准时间
Fiji Standard Time,(GMT+12:00) 斐济,堪察加半岛,马绍尔群岛,斐济标准时间
Tonga Standard Time,(GMT+13:00) 努库阿洛法,汤加标准时间
*/
C# ——获取各国时间的更多相关文章
- iOS中获取当前时间,设定时间,并算出差值
NSDate *date = [NSDate date];//获取当前时间 NSTimeZone *zone = [NSTimeZone systemTimeZone];//修改时区 NSIntege ...
- Js获取当前日期时间及其它操作
Js获取当前日期时间及其它操作var myDate = new Date();myDate.getYear(); //获取当前年份(2位)myDate.getFullYear(); //获取完整的年份 ...
- 【转】Js获取当前日期时间及格式化操作
(转自:http://www.cnblogs.com/qinpengming/archive/2012/12/03/2800002.html) var myDate = new Date(); myD ...
- PHP 获取中国时间,即上海时区时间
/** * 获取中国时间,即上海时区时间 * @param <type> $format * @return <type> */ function getChinaTime($ ...
- C#获取北京时间与设置系统时间
获取北京时间 public static DateTime GetBeijingTime() { DateTime dt; // 返回国际标准时间 // 只使用 timeServers 的 IP 地址 ...
- jquery 获取日期时间
获取JavaScript 的时间使用内置的Date函数完成 var mydate = new Date();mydate.getYear(); //获取当前年份(2位)mydate.getFullYe ...
- 使用 jquery 获取当前时间的方法
我们在写一些效果时,经常要用到 jquery 获取当前时间,但是jquery 目前并没有提供直接获取当前时间的 api 或者函数,所以我们还是得用原生的 javascript 时间对象 Date 来获 ...
- java学习第13天( java获取当前时间,有关大数据的运算及精确数字运算,Date类)
一 java获取当前时间 学习一个函数,得到当前时间的准确值 System.currectTimeMillis(). 可以得到以毫秒为单位的当前时间.它主要用于计算程序运行时间,long start= ...
- js获取当前时间显示在页面上
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
随机推荐
- jvm系列(一)运行时数据区
C++程序员肩负着每一个对象生命周期开始到终结的维护责任.Java程序员则可以借助自动内存管理机制,不需要自己手动去释放内存.由虚拟机进行内存管理,不容易出现内存泄漏和内存溢出的问题,但是一旦出现这些 ...
- Elements-of-Python_02_DataType
(内容包括数据类型,运算符) 1.数据类型Data Types 1.1 简介Brief Introduction Python3中的数据类型,类型关键字,赋值,见下表: 1.1数字Number Pyt ...
- springboot多模块项目搭建遇到的问题记录
废话不多说,直接上问题报错与解决方法. 问题报错一:(报错信息看下方代码) 问题原因:'com.company.logistics.service.company.CompanyService' 未找 ...
- PyQt(Python+Qt)学习随笔:工具箱(QToolBox)编程使用的步骤及示例代码
老猿Python博文目录 专栏:使用PyQt开发图形界面Python应用 老猿Python博客地址 使用toolBox开发应用时,通过Designer设计ui界面时,只能在Designer中设计too ...
- 第15.23节 PyQt(Python+Qt)入门学习:Model/View架构中QListView视图配套Model的开发使用
老猿Python博文目录 专栏:使用PyQt开发图形界面Python应用 老猿Python博客地址 一.概述 QListView理论上可以和所有QAbstractItemModel派生的类如QStri ...
- 第14.9节 Python中使用urllib.request+BeautifulSoup获取url访问的基本信息
利用urllib.request读取url文档的内容并使用BeautifulSoup解析后,可以通过一些基本的BeautifulSoup对象输出html文档的基本信息.以博文<第14.6节 使用 ...
- PyQt学习随笔:Model/View开发时从Model相关类派生自定义类需要注意的问题
在<PyQt学习随笔:重写setData方法截获Model/View中视图数据项编辑的注意事项>介绍的方法,从Model相关类派生自定义类,通过重写setData方法以获取View中数据的 ...
- windows server2012无法安装.Net FrameWork 3.5功能
问题描述: 现象1:安装完服务器系统,在安装SQL Server 2012,安装到中间提示安装SQL Server 2012过程中出现"启用windows功能NetFx3时出错"以 ...
- pyppeteer 登录一般网站 并利用 http方法获取登录页面的验证码
主函数 新建浏览器,进行登录,由于验证码的识别准确率不是百分之百,需要多次尝试. async def main(self, username, pwd, url): # 定义main协程函数, log ...
- 使用Jmeter测试thrift接口
术语描述 jmeter:一款性能压力测试工具,支持多种协议,java .http 等,但是不支持thrift thrift:跨语言的RPC调用框架,提供编译器,可以将thrift接口生成不同语言的接口 ...