Working with TimeZone and TimeZoneInfo
You might often wonder what people are doing on the other side of world when in your country it’s a particular time of the day. Working with time zones can also be important for your business if you need to contact people who live in other countries. The .NET Framework provides two types, TimeZone
and TimeZoneInfo
, that enable you to retrieve information on time zones. Both types are exposed by the System
namespace. For example, say that you want to retrieve information on the time zone of your country. This can be accomplished as follows (assuming that regional settings on your machine are effectively related to your country):
Dim zone As TimeZone = TimeZone.CurrentTimeZone ...
Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.