Class DateNowValue

All Implemented Interfaces:
Serializable

public class DateNowValue extends DateSingleValue

Class to commit a time which refers to the current time.

Depending on the committed values, different searches are performed:

  • If roundTo == null and relative == null, a search for the exact current times is performed.
  • If roundTo != null and relative == null, a range query is performed.
    From is current time rounded down, To is current time rounded up, defined by roundTo.
  • If relative != null: A range query relative to current time is performed.
    • If the biggest relative value is negative, a range query into the past is performed.
      From is current time - relative, rounded down if roundTo != null. To is current time, rounded up if roundTo != null.
    • If the biggest relative value is positive, a range query into the future is performed.
      From is current time, rounded down if roundTo != null. To is current time + relative, rounded to if roundTo != null.

    The delivered date is converted to the time zone submitted in ClientInfo

A time offset to UTC time can be delivered by diffToUtc.
SearchFieldE.X_DATE, SearchFieldE.I_DATE, SearchFieldE.DELETED_DATE and SearchFieldE.TIMESTAMP are converted to UTC prior to saving them, index lines in date format are not converted.
Therefore, a timezone should always be commited for these four.

Since:
11.00.000.019
See Also:
  • Field Details

    • roundTo

      protected DateRoundE roundTo
      Define to which time unit this date should be rounded.
      If it is != null, a range query is performed.
    • relative

      protected DateRelative relative
      Relative time differences to now.
      Can be null.
  • Constructor Details

    • DateNowValue

      public DateNowValue()
    • DateNowValue

      public DateNowValue(DateRelative relative)
    • DateNowValue

      public DateNowValue(DateRoundE roundto)
    • DateNowValue

      public DateNowValue(DateRelative relative, DateRoundE roundto)
  • Method Details