[This is preliminary documentation and is subject to change.]
Creates a new ZonedDateTime representing the same instant in time, in the
same calendar but a different time zone.
| C# | Visual Basic | Visual C++ |
public ZonedDateTime WithZone( DateTimeZone targetZone )
Public Function WithZone ( _ targetZone As DateTimeZone _ ) As ZonedDateTime
public: ZonedDateTime WithZone( DateTimeZone^ targetZone )
- targetZone (DateTimeZone)
- The target time zone to convert to.
A new value in the target time zone.
| Exception | Condition |
|---|---|
| ArgumentNullException | targetZone is null. |
Assembly: NodaTime (Module: NodaTime.dll) Version: 1.2.0.0 (1.2.0)