Assets AQL function startOfDay() always returns a value in UTC

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • Component/s: Assets - AQL
    • None
    • 1
    • Severity 3 - Minor

      Issue Summary

      While searching for Asset Object using AQL function startOfDay(), it always performs the search based on the UTC Timezone and not based on user timezone.

      Steps to Reproduce

      1. Update your Timezone to IST timezone (UTC + 5:30) in Profile settings
      2. Update few Asset objects between 12:00 AM to 5:30 AM
      3. Now search for the object using the below AQL and you won't find any results
        "Updated" >= startOfDay()
        
      4. whereas if you search using the below AQL it gives us the expected results
        "Updated" >= startOfDay(-6h)
        
      5. If we try similar search using the now(), it works based on the user time zone and not based on UTC timezone.
        "Updated" >= now(-10m)
        

      Expected Results

      AQL to provide the expected results based on user timezone.

      Actual Results

      AQL performs search based on UTC and doesn't provide us with expected results.

      Workaround

      Use the AQL based on the UTC timezone (or) use a query condition like :
      "Updated" >= startOfDay(-6h)

            Assignee:
            Atul Arohi
            Reporter:
            Prabhu Subramaniyan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: