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 1mSkzl-0000fc-8z for pgsql-general@arkaria.postgresql.org; Tue, 21 Sep 2021 18:59:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mSkzj-0006d5-Ak for pgsql-general@arkaria.postgresql.org; Tue, 21 Sep 2021 18:59:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSkzj-0006cw-1m for pgsql-general@lists.postgresql.org; Tue, 21 Sep 2021 18:59:55 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSkzZ-0002Zt-5G for pgsql-general@lists.postgresql.org; Tue, 21 Sep 2021 18:59:54 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 222F05689; Tue, 21 Sep 2021 20:59:41 +0200 (CEST) Date: Tue, 21 Sep 2021 20:59:41 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Timestamp with vs without time zone. Message-ID: Mail-Followup-To: pgsql-general@lists.postgresql.org References: <72C6EDD6-39E3-47A9-B313-A4D6C7AF0C44@fairwindsoft.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8k1DD2nzZrhsLfLA" Content-Disposition: inline In-Reply-To: <72C6EDD6-39E3-47A9-B313-A4D6C7AF0C44@fairwindsoft.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --8k1DD2nzZrhsLfLA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Can y'all please trim your quotes? Having to scroll down 80+ lines to get to the content is cumbersome] On 2021-09-21 13:17:39 -0500, FWS Neil wrote: > A timestamp cannot have a time zone and be a valid timestamp. >=20 > Let me explain. >=20 > A timestamp is a single time that exists in the world. Correct. > For example March 1, 2021, 4:15 am is a timestamp. This is NOT a timestamp, because it is not a single time that exists in the world. It is about 30 different times that exist in the world. You can turn it into a timestamp by adding timezone information: March 1 2021, 4:15 am, America/Chicago Now it's a single time, equivalent to 2021-03-01T10:15:00Z. However, if you don't have to store the timezone if you have some other way to unambiguously specify the time, e.g. by always using UTC or by storing seconds since an epoch. hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --8k1DD2nzZrhsLfLA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmFKK5gACgkQ8g5IURL+ KF1ZiQ/7B20R0GwJ2zrAn1Hqkltvs9bSdnnucDT00C05l2Y6CwUWdooGYiL9mKJ5 A1/DRhRaXJwejgILTVgJv7IVY+v4kI3O4MIJeYRFST9ath3jZlyTB/8sub/GuoWR VS5yEGlfx2VjcBMnaLllGrJbM/ccf3I1kbVi5c+KQd6955gsiRyP+EhC0bDh1gNm CheTUPMhR7qz0e34ldQ8dfJXPumTOfquNHew1jIebyvW4u+buOVmIQ4uQfcVRyMB a9ylCW5QD9ntSlXlgp0Ly0el6uunCOjtO4+FSLeVc/NLh4Gu8aSd/PWrPQqkXxYg KXe/8Zqg42Zct7ILPzmflMnENBFDHu39vAQJ0bymuETI9ZA/U82jxGWNwpI5JHmN Neouw03B+VOelTpRU/jdKbnT/MJz6/yO9DtCNZEUKA3J+V8s9z4XzF/77gKWTR/3 A5+YY6ioLNgcv0yuIEVyiNMhgllTyF2S3Xj78TGXCrYeoxGXsZARLMxMPck1wsyX SscyDLHyKibQRXHFFM8Rqghaods0DjmEI3lbwF1SvcNKyqDL6Dl/8h5oUNy2GoOt Ha8quiqTAdwPNczskqamV1q0RU7Nry33pjY9GIPP/2mq91R3/reoqhq2qHpZiaX4 giZ1KF6sGBPLl74M1A5QwjYHSa11Y7NUIuz/R7r3Lry5igHCdAo= =N90r -----END PGP SIGNATURE----- --8k1DD2nzZrhsLfLA--