Re: JSON / ASP.NET AJAX Dates support in PostgreSQL - Mailing list pgsql-general

From Adrian Klaver
Subject Re: JSON / ASP.NET AJAX Dates support in PostgreSQL
Date
Msg-id c14ff08a-0c8a-9b44-a760-e23eb987d10e@aklaver.com
Whole thread Raw
In response to Re: JSON / ASP.NET AJAX Dates support in PostgreSQL  (Sebastien Flaesch <sebastien.flaesch@4js.com>)
List 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.klaver@aklaver.com




pgsql-general by date:

Previous
From: Sebastien Flaesch
Date:
Subject: Re: JSON / ASP.NET AJAX Dates support in PostgreSQL
Next
From: Ciprian Craciun
Date:
Subject: Re: Unexpected behavior when combining `generated always` columns and update rules