> "rob" == rob stone writes:
rob> You can EXTRACT timezone, timezone_hour and timezone_minute from a
rob> timestamp. Using 'timezone' returns a value representing seconds
rob> from UTC.
Yes, but this always outputs a value representing the server timezone;
there's no way (other than the s
On Wed, 2019-09-25 at 10:12 +1000, Paul McGarry wrote:
>
> On Wed, Sep 25, 2019 at 5:44 AM Adrian Klaver <
> adrian.kla...@aklaver.com> wrote:
> >
> Andrew's function seems plausible and I need to find some time to
> test it, but I am slightly surprised there isn't a native way to get
> the o
> "Paul" == Paul McGarry writes:
> On Wed, Sep 25, 2019 at 5:44 AM Adrian Klaver
> wrote:
>>
>> "Therefore whatever renders the offset needs to be capable of doing
>> it per row, independently of the server/session time zone."
The key point here is that storing the timestamp as WITHOUT
On Wed, Sep 25, 2019 at 5:44 AM Adrian Klaver
wrote:
>
> The issue is unclear so I am not sure you can discount this as a
> solution. The OP had:
>
> CREATE TABLE users (
> user_id biginit,
> user_timezone text, -- Eg 'Australia/Sydney','Asia/Hong_Kong'
> );
> CREATE TABLE data (
> id bigint,
> u
On 9/23/19 7:40 PM, Andrew Gierth wrote:
"Adrian" == Adrian Klaver writes:
Adrian> This has come up before and the general suggestion has been to
Adrian> have a column for a naive(timestamp w/o tz) timestamp and a
Adrian> column for the timezone.
No, that's usually (not always) backward
> "Adrian" == Adrian Klaver writes:
Adrian> This has come up before and the general suggestion has been to
Adrian> have a column for a naive(timestamp w/o tz) timestamp and a
Adrian> column for the timezone.
No, that's usually (not always) backwards, and in any event wouldn't
solve this p
On 9/23/19 1:32 AM, Paul McGarry wrote:
Hi there,
Does anyone have a good way of doing:
=
select '2020-04-04 15:00:00+00'::timestamp with time zone AT TIME ZONE
'Australia/Sydney';
timezone
-
2020-04-05 02:00:00
select '2020-04-04 16:00:00+00'::timestamp with
> "Paul" == Paul McGarry writes:
Paul> Hi there,
Paul> Does anyone have a good way of doing:
Paul> =
Paul> select '2020-04-04 15:00:00+00'::timestamp with time zone AT TIME ZONE
Paul> 'Australia/Sydney';
Paul> timezone
Paul> -
Paul> 2020-04-05 02:00:00