public class ZonedToLocalDateTimeModel extends Object implements IModel<LocalDateTime>
Constructor and Description |
---|
ZonedToLocalDateTimeModel(IModel<ZonedDateTime> model)
Map the given
ZonedDateTime to a LocalDateTime in the client's time zone. |
Modifier and Type | Method and Description |
---|---|
void |
detach()
Detaches model after use.
|
protected ZoneId |
getClientTimeZone()
What is the
ZoneId of the client. |
LocalDateTime |
getObject()
Gets the model object.
|
protected ZoneId |
getTargetTimeZone()
What is the
ZoneId of created ZonedDateTime objects. |
void |
setObject(LocalDateTime dateTime)
Sets the model object.
|
public ZonedToLocalDateTimeModel(IModel<ZonedDateTime> model)
ZonedDateTime
to a LocalDateTime
in the client's time zone.model
- zoned date timepublic void detach()
IDetachable
detach
in interface IDetachable
detach
in interface IModel<LocalDateTime>
protected ZoneId getTargetTimeZone()
ZoneId
of created ZonedDateTime
objects.public LocalDateTime getObject()
IModel
getObject
in interface IModel<LocalDateTime>
public void setObject(LocalDateTime dateTime)
IModel
setObject
in interface IModel<LocalDateTime>
dateTime
- The model objectCopyright © 2006–2022 Apache Software Foundation. All rights reserved.