DateTimeExtensions.AsUtcTime Method
Returns the DateTime object as UTC DateTime
Namespace: MoreDateTime.ExtensionsAssembly: MoreDateTime (in MoreDateTime.dll) Version: 1.3.0
public static DateTime AsUtcTime(
this DateTime time,
CultureInfo? cultureInfo,
TimeZoneInfo? timeZoneInfo = null
)
Dim time As DateTime
Dim cultureInfo As CultureInfo
Dim timeZoneInfo As TimeZoneInfo
Dim returnValue As DateTime
returnValue = time.AsUtcTime(cultureInfo,
timeZoneInfo)
public:
[ExtensionAttribute]
static DateTime AsUtcTime(
DateTime time,
CultureInfo^ cultureInfo,
TimeZoneInfo^ timeZoneInfo = nullptr
)
No code example is currently available or this language may not be supported.
- time DateTime
- The time.
- cultureInfo CultureInfo
- The CultureInfo for the source calendar, can be null for current
- timeZoneInfo TimeZoneInfo (Optional)
- The source timezone, can be null for current
DateTimeA DateTime.In Visual Basic and C#, you can call this method as an instance method on any object of type
DateTime. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).