Converts this dateTime UTC time to another time zone
Namespace: MomentSharpAssembly: MomentSharp (in MomentSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static DateTime ToTimeZone(
this DateTime dateTime,
string toTimeZoneId
)
<ExtensionAttribute>
Public Shared Function ToTimeZone (
dateTime As DateTime,
toTimeZoneId As String
) As DateTime
public:
[ExtensionAttribute]
static DateTime ToTimeZone(
DateTime dateTime,
String^ toTimeZoneId
)
[<ExtensionAttribute>]
static member ToTimeZone :
dateTime : DateTime *
toTimeZoneId : string -> DateTime
Parameters
- dateTime
- Type: SystemDateTime
this DateTime - toTimeZoneId
- Type: SystemString
For valid parameters see TimeZoneInfo.GetSystemTimeZones()
Return Value
Type:
DateTimeDateTime(Moment, Boolean)Usage Note
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).
See Also