Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pmzGy-0001q7-CH for pgsql-general@arkaria.postgresql.org; Thu, 13 Apr 2023 15:54:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pmzGx-00006Q-9e for pgsql-general@arkaria.postgresql.org; Thu, 13 Apr 2023 15:54:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pmzGw-00006A-En for pgsql-general@lists.postgresql.org; Thu, 13 Apr 2023 15:54:06 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pmzGs-002fax-2m for pgsql-general@lists.postgresql.org; Thu, 13 Apr 2023 15:54:05 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id B2708320082A; Thu, 13 Apr 2023 11:53:56 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 13 Apr 2023 11:53:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1681401236; x=1681487636; bh=GofP3hcxW6rucgThSUyJ46/dxo4qAr2Z69x xV/sq/VU=; b=Ge9oXjCv3WA5UH2onqLn3Vd3I6tUg9+uIvq+7A9RyAtrUvpFsSC YwDIYgiXERAcnRT1lAxPHn1jkjhjruOGoc0pkZ8DDk5Bll35yY11pIsRM0Iu1yub ufakjxgpwH/UpQ2nuZuXfoqqQPVjp3OJO5OoJMZRwdJlaEn23M1w002eGzJefRJW 4kl9rnLThc3LlNcq0EqY9BZ2I7Q+btxB/TYYIAa6df9qD9j0b24pLoNHdDnMPP8x NUrvLktN+n6BmoSMLI/e3ULA/ctfx4SSP5TnAAGYveZWxbd7d1Ej8CICo6jjaU6t ZFhz4/W36Mo3pEcK09Vadh8GFmIAct4wo/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1681401236; x= 1681487636; bh=GofP3hcxW6rucgThSUyJ46/dxo4qAr2Z69xxV/sq/VU=; b=b yhqmyywVuvqvH3Hm1fq73FLcG+Otagjm0Aj15tj+N/ZhEL0keSYL3CA7esx+Kjys ey/EHTdhI0xnV7etAKGLvKL3jdMDhePq8fZRe2eoycgOM50MJRa9JekRtE2gGIjT 2ffB9E8cg1d2ND8Kz8QIdklrrAybbRRQQM4deQAJZGPkCHEUmpofEJWYuDD/MHDT SdkgaYz6DeFuH1Y7UlDVI5qNBpV0txkQqnzRjlKknCYpURnZEZX1v+pWUgLHYCjP Jt+LNyNmRarqJOerRjv+XdqeFbGkxE9i8Fr0irBT+ifAVerEb4nlTNZF47gb2OYN /Fb2LDGrbK9UmvCZrizjA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekkedgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeelueejffejgfekvdejteehleeiffekueetheelgeel feevleetveevkefhleefhfenucffohhmrghinhepmhhomhgvnhhtjhhsrdgtohhmpdgrsh hprdhnvghtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Apr 2023 11:53:55 -0400 (EDT) Message-ID: Date: Thu, 13 Apr 2023 08:53:54 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: JSON / ASP.NET AJAX Dates support in PostgreSQL To: Sebastien Flaesch , Ron , "pgsql-general@lists.postgresql.org" References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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/ > ) > > 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