SQL Query: Unify Timezones

59 Views Asked by At

In my DB there is a date-time (slot_start) field. Unfortunately the entries are expressed in two different time zones. For example: 2021-02-08T08:00:00+01:00 and 2021-02-08T07:00:00+00:00

Now I'm trying to list all entries in Central European Time (CET).

I have tried the following:

SELECT customer_nicename,
   service_name,
   CONVERT_TZ(slot_start,'+00:00','+00:00') AS Slot_Start,
   status
FROM reservations
WHERE status LIKE 'confirmed'

But one of the two time zones are expressed shifted by an hour.

I dont get any further - can somebody help me out? Thanks a lot!

0

There are 0 best solutions below