pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Sebastien Flaesch <sebastien.flaesch@4js.com>
To: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: JSON / ASP.NET AJAX Dates support in PostgreSQL
Date: Thu, 13 Apr 2023 08:53:54 -0700
Message-ID: <c14ff08a-0c8a-9b44-a760-e23eb987d10e@aklaver.com> (raw)
In-Reply-To: <DBAP191MB12893E55BD6C5EA8376E8A01B0989@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>
References: <DBAP191MB12896A817739B869A781C00CB0989@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>
	<c6fceaf9-0823-b2ad-ae00-3aa54ee017b1@gmail.com>
	<DBAP191MB12893E55BD6C5EA8376E8A01B0989@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>

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






view thread (9+ messages)  latest in thread

Message-ID: <c14ff08a-0c8a-9b44-a760-e23eb987d10e@aklaver.com>
Permalink:  ../c14ff08a-0c8a-9b44-a760-e23eb987d10e@aklaver.com/
Also on:    postgresql.org/message-id/c14ff08a-0c8a-9b44-a760-e23eb987d10e@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, sebastien.flaesch@4js.com, ronljohnsonjr@gmail.com
  Subject: Re: JSON / ASP.NET AJAX Dates support in PostgreSQL
  In-Reply-To: <c14ff08a-0c8a-9b44-a760-e23eb987d10e@aklaver.com>
  References: <DBAP191MB12896A817739B869A781C00CB0989@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM> <c6fceaf9-0823-b2ad-ae00-3aa54ee017b1@gmail.com> <DBAP191MB12893E55BD6C5EA8376E8A01B0989@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM> <c14ff08a-0c8a-9b44-a760-e23eb987d10e@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox