Re: JSON / ASP.NET AJAX Dates support in PostgreSQL

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Sebastien Flaesch <sebastien(dot)flaesch(at)4js(dot)com>, Ron <ronljohnsonjr(at)gmail(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: JSON / ASP.NET AJAX Dates support in PostgreSQL
Date: 2023-04-13 15:53:54
Message-ID: c14ff08a-0c8a-9b44-a760-e23eb987d10e@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/13/23 08:31, Sebastien Flaesch wrote:
>
> >From the investigation we did here, I can confirm that the number in
> AJAX Date is the milliseconds since Epoch (1970-01-01 00:00:00), and
> it's always in UTC, even if there is a timezone offset provided. I
> mention this because it's different from ISO 8601 datetimes, where the
> datetime part is in local time corresponding to the offset, when one is
> specified (check https://momentjs.com/docs/#/parsing/asp-net-json-date/
> <https://momentjs.com/docs/#/parsing/asp-net-json-date/>)
>
> So, is there some built-in JSON API in PostgreSQL to convert an AJAX
> Date from JSON or do I have to do this by hand?

By hand as this is a MS/ASP thing:

https://weblogs.asp.net/bleroy/dates-and-json

not a JSON thing.

>
> Seb
> ------------------------------------------------------------------------

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ciprian Craciun 2023-04-13 16:27:37 Re: Unexpected behavior when combining `generated always` columns and update rules
Previous Message Sebastien Flaesch 2023-04-13 15:31:49 Re: JSON / ASP.NET AJAX Dates support in PostgreSQL