adobe / helix-run-query

service that executes queries on BigQuery datasets generated by Helix-Logging
Apache License 2.0
6 stars 11 forks source link

fix: add timezone to date functions #1061

Closed langswei closed 9 months ago

langswei commented 9 months ago

Some run-queries do not handle timezone consistently. The most obvious case is for a one-day query which returns two results.

Old: https://helix-pages.anywhere.run/helix-services/run-query@v3/rum-pageviews?url=www.aem.live&domainkey=d77c830d-3ec9-4611-8b86-256346fa7659&interval=-1&offset=-1&startdate=2024-02-20&enddate=2024-02-21&timezone=America/New_York New: https://helix-pages.anywhere.run/helix-services/run-query@ci6895/rum-pageviews?url=www.aem.live&domainkey=d77c830d-3ec9-4611-8b86-256346fa7659&interval=-1&offset=-1&startdate=2024-02-20&enddate=2024-02-21&timezone=America/New_York

Note: There is a separate issue around EVENTS_V3 in which a one-day query can return two days, if the time field is exactly on the midnight hour. You can see this by replacing America/New_York in the URLs above with America/Chicago. This will be resolved with a change to that table function, which may happen separately or together with a proposal to include an entire days worth of data on the end date instead of cutting off at <= midnight.

trieloff commented 9 months ago

:tada: This PR is included in version 3.14.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: