I want to retrieve the daily number of signups recorded in Berlin timezone, but by default my database is using timezone '-08'. How do I do a select statement while specifying timezone?
2 Answers
So are you looking for timezone the client was in when they registered? If you don't record it it's gone. timestamptz or timestamp with timezone converts from local timezone to GMT on the way in, and GMT to local on the way out. It does not store the current timezone. It simply adjusts inputs and outputs to it. If you need to store the timezone you need to store it in another column when you create or update the row.