Hello we are observing wrong result for below quer...
# general
s
Hello we are observing wrong result for below query select dateTrunc('hour', 1765295114678, 'MILLISECONDS', 'America/New_York', 'MILLISECONDS') AS original_event_time_hours_buckets2,dateTrunc('hour', 1765295114678, 'MILLISECONDS', 'Europe/Berlin', 'MILLISECONDS') AS original_event_time_hours_buckets from test limit 10 its giving us same Epoch milliseconds as UTC. 1765292400000 1765292400000 it should have different epoch milliseconds for different timezone.How ever ASIA/Kolkota timezone is giving correct result. is it bug for timezone aware query for pinot?
m
Epoch millis is always UTC. Can you try another format when converting to different time zone?
s
Can you please guide me what format I can try
Copy code
SELECT
  toDateTime(
    dateTrunc('hour', 1765295114678, 'MILLISECONDS', 'America/New_York', 'MILLISECONDS'),
    'yyyy-MM-dd HH:mm:ss',
    'America/New_York'
  ) AS ny_local_hour,

  toDateTime(
    dateTrunc('hour', 1765295114678, 'MILLISECONDS', 'Europe/Berlin', 'MILLISECONDS'),
    'yyyy-MM-dd HH:mm:ss',
    'Europe/Berlin'
  ) AS berlin_local_hour,

  toDateTime(
    dateTrunc('hour', 1765295114678, 'MILLISECONDS', 'Asia/Kolkata', 'MILLISECONDS'),
    'yyyy-MM-dd HH:mm:ss',
    'Asia/Kolkata'
  ) AS kolkata_local_hour
FROM test
LIMIT 1;
image.png