to compare Indian time

2019-08-26 23:15发布

I want to find out what will be the time in india when clock tick to 1Am mid night in any other country.. How i will find out that through any means plz help me to find out this this is to fire birthbay mails at 1AM midnight of that resp country...

3条回答
我欲成王,谁敢阻挡
2楼-- · 2019-08-26 23:57

You might want to look at the method:

TimeZoneInfo.ConvertTime
查看更多
爷的心禁止访问
3楼-- · 2019-08-26 23:58

.NET 3.5 added the class TimeZoneInfo which should be able to do want you want. Particularly, the TimeZoneInfo.ConvertTime(DateTime, TimeZoneInfo, TimeZoneInfo) method.

You can also use the TimeZoneInfo.GetSystemTimeZones() method to get the list of time zones that are registered in the system.

查看更多
姐就是有狂的资本
4楼-- · 2019-08-27 00:02

SQL SERVER 2008 would have the DATETIMEOFFSET data type (which includes the time zone) plus functions like SWITCHOFFSET to switch from one timezone offset to another.

What version are you on?

查看更多
登录 后发表回答