2 Replies Latest reply on Nov 19, 2013 10:26 AM by Kristin Lundin

    Time zone problem

      I have date in postgres database stored as timestamp in CET timezone. When I query data with Tableau Desktop I get those timestamps interpreted as in UTC timezone. If I create calculated field, and add one hour to date (CET is +1 timezone)  I mostly get correct data, except for 25th march (problem with daylight saving). It looks like tableau first sets timezone to UTC and then send query to database. Is there any way to set up Tableau Desktop to set timezone to CET?



        • 1. Re: Time zone problem
          Ben Batsir

          A pretty satisfied workaround we've found is using a parameter in the DATEADD function to calculate the "time shift" difference to overcome the UTC auto added difference:


          So, for example if you have a column called "Start Time" and you want to add 3 hours to all its rows, do the following:


          1) Define a parameter such as "time_shift" and define its value to be an integer with the value=3.

          2) Use this formula:

               DATEADD('hours', [time_shift],[Start Time])


          The advantage using a parameter is that it's affecting all formulas it's being used in.


          Hope it helps,


          • 2. Re: Time zone problem
            Kristin Lundin

            How do you handle daylight savings? Does anyone have a formula that will adjust for DST as well? I can try to write one but figured I'd ask first.