Working with TimeZone
and TimeZoneInfo
You might often ask 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 different and far away countries. The .NET Framework provides two types, TimeZone
and TimeZoneInfo
, which enable retrieving information on time zones. Both types are exposed by the System
namespace. For example, imagine you want to retrieve information on the time zone of your country. This can be accomplished as follows (assuming regional settings on your machine are effectively related to your country):
Dim zone As TimeZone = TimeZone.CurrentTimeZone
TimeZone
is a reference type ...
Get Visual Basic® 2010 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.