https://www.growthbook.io/ logo
#contributing
Title
# contributing
h

helpful-carpenter-3208

02/24/2023, 7:48 PM
Hi GB team. We are using Clickhouse as our data source. And we found a timezone issue about the experiment query. Bellow is a query sample about experiment. It used
toDateTime
to filter the timestamp. And we use the UTC time in the experiment settings. but by default Clickhouse is using the server timezone which is not UTC. so the fix should be add UTC in the toDateTime function like this
toDateTime('2023-02-24 17:00:00', 'UTC')
Can anyone help on this?
Copy code
__experiment as (-- Viewed Experiment
    SELECT
      e.user_id as user_id,
      toString(e.variation_id) as variation,
      e.timestamp as timestamp,
      e.timestamp as conversion_start,
      
      dateAdd(hour, 720, e.timestamp) as conversion_end
    FROM
        __rawExperiment e
    WHERE
        e.experiment_id = 'SOME_EXP_ID'
        AND e.timestamp >= toDateTime('2023-02-24 17:00:00')
        
    )
@fresh-football-47124☝️
f

fresh-football-47124

03/01/2023, 2:11 AM
@future-teacher-7046 Any ideas?
45 Views