Class ChatDateTimeSupport

java.lang.Object
io.jmix.aitoolsflowui.view.chat.support.ChatDateTimeSupport

@Component("aitls_ChatDateTimeSupport") public class ChatDateTimeSupport extends Object
Renders chat timestamps in the current user's time zone.
  • Field Details

  • Constructor Details

    • ChatDateTimeSupport

      public ChatDateTimeSupport()
  • Method Details

    • getCurrentUserZone

      public ZoneId getCurrentUserZone()
      Returns the current user's time zone (the application default when the user has none).
      Returns:
      the current user's zone id
    • formatInUserZone

      public String formatInUserZone(@Nullable OffsetDateTime value)
      Formats the timestamp in the current user's time zone, keeping the same instant.
      Parameters:
      value - timestamp to format, may be null
      Returns:
      the formatted timestamp, or an empty string when value is null