Skip to content

Instantly share code, notes, and snippets.

@s-oravec
Created May 28, 2018 16:57
Show Gist options
  • Select an option

  • Save s-oravec/66360ffe327c7aa8c954d44fc839605a to your computer and use it in GitHub Desktop.

Select an option

Save s-oravec/66360ffe327c7aa8c954d44fc839605a to your computer and use it in GitHub Desktop.
GMT vs. CET TimeZone
-- GMT vs. CET
with dates as
(select from_tz(cast(trunc(sysdate, 'YYYY') + level as timestamp), 'GMT') as gmt from dual connect by level <= 365),
tzs as
(select gmt, gmt at time zone 'CET' as cet from dates)
select to_date(to_char(gmt, 'YYYY-MM-DD HH24:MI:SS'), 'YYYY-MM-DD HH24:MI:SS') as gmt,
to_date(to_char(cet, 'YYYY-MM-DD HH24:MI:SS'), 'YYYY-MM-DD HH24:MI:SS') as cet
from tzs;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment