Class ChatDateTimeSupport
java.lang.Object
io.jmix.aitoolsflowui.view.chat.support.ChatDateTimeSupport
Renders chat timestamps in the current user's time zone.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CurrentAuthenticationprotected DatatypeFormatterprotected DateTimeTransformations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformatInUserZone(@Nullable OffsetDateTime value) Formats the timestamp in the current user's time zone, keeping the same instant.Returns the current user's time zone (the application default when the user has none).
-
Field Details
-
currentAuthentication
-
dateTimeTransformations
-
datatypeFormatter
-
-
Constructor Details
-
ChatDateTimeSupport
public ChatDateTimeSupport()
-
-
Method Details
-
getCurrentUserZone
Returns the current user's time zone (the application default when the user has none).- Returns:
- the current user's zone id
-
formatInUserZone
Formats the timestamp in the current user's time zone, keeping the same instant.- Parameters:
value- timestamp to format, may benull- Returns:
- the formatted timestamp, or an empty string when
valueisnull
-