Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0mOl-0007e5-Id for pgsql-admin@arkaria.postgresql.org; Tue, 27 Mar 2018 11:04:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f0mOk-0006BK-1n for pgsql-admin@arkaria.postgresql.org; Tue, 27 Mar 2018 11:04:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0mOj-0006BB-Op for pgsql-admin@lists.postgresql.org; Tue, 27 Mar 2018 11:04:13 +0000 Received: from forward101o.mail.yandex.net ([2a02:6b8:0:1a2d::601]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0mOg-0001T2-Sw for pgsql-admin@lists.postgresql.org; Tue, 27 Mar 2018 11:04:13 +0000 Received: from mxback14j.mail.yandex.net (mxback14j.mail.yandex.net [IPv6:2a02:6b8:0:1619::90]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 72AA613418D9 for ; Tue, 27 Mar 2018 14:04:07 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback14j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id o8iJ6iB4Uq-47PGUe5f; Tue, 27 Mar 2018 14:04:07 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1522148647; bh=MsD0N2C0It1/CzdSWgDN6KHgZsy129GYnJLEzXkskiU=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=EAQasEschPOlipO0eImXy5wwHpZkp+DUXYl1U+y4J6PnpkNCYJR0MLVJI6KMpAptg 6EqUkFqof21YdZ9xTV9Pn2304adqepklZy3dgU7NaW16irfOjH1m+Subw6S+FwznyM m+/UP7+cLBLjsxCkSQN0Hh13XlSCjFkoJoirF7Uk= Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Kv6Z3sPp3v-46SOEZTD; Tue, 27 Mar 2018 14:04:06 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1522148646; bh=MsD0N2C0It1/CzdSWgDN6KHgZsy129GYnJLEzXkskiU=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=RECG8SHJSACm9BI1zpAozePiHsmsD81krx27F6gTxSRP+5sH3aPaAZgfqo2bcCVRf 1aH74P9kADYW9xy2AFFUPL6kcTx2VpIQQX8ZrNFFWV3rUNieMm1sRq+5k5WYEAih8C F/96IHKwJMcwIork6wHgSKgJLQM73GHQpxr1r8DE= Authentication-Results: smtp4o.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: Strange behavior of the timezone To: pgsql-admin@lists.postgresql.org References: <5ABA12F8.8040900@sibvisions.com> From: Vlad Alexeenkov Message-ID: Date: Tue, 27 Mar 2018 14:04:05 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <5ABA12F8.8040900@sibvisions.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: ru-RU List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On server - UTC Local - Europe/Moscow For example, from 1920 all right: If run in DataGrip: select '1900-01-01 15:11:10'::timestamp t1, '1900-01-01 15:11:10'::timestamp at time zone 'Europe/Moscow' as t2 1900-01-01 15:11:10.000000    1900-01-01 12:40:53.000000 select '1920-01-01 15:11:10'::timestamp t1, '1920-01-01 15:11:10'::timestamp at time zone 'Europe/Moscow' as t2 1920-01-01 15:11:10.000000    1920-01-01 12:11:10.000000 select '1900-01-01 15:11:10'::timestamp t1, '1900-01-01 15:11:10'::timestamp at time zone 'UTC-3' as t2 1900-01-01 15:11:10.000000    1900-01-01 12:11:10.000000 Thanks On 27.03.2018 12:46, Robert Zenz wrote: > That is not necessarily a strange behavior, as the Timezome most likely includes > all the adjustments that were made in the period of time (leap seconds and the > like). At least as far as I know. > > How does it behave if you try a more current date, like today? What is your > system/database timezone? > > > On 27.03.2018 11:40, Vlad Alexeenkov wrote: >> Hi! >> >> Can anyone explain this behavior? >> >> select '1900-01-01 15:11:10'::timestamp t1, '1900-01-01 15:11:10'::timestamp at >> time zone 'Europe/Moscow' as t2 >> >> t1 t2 >> =================== =================== >> 01.01.1900 15:11:10 01.01.1900 15:40:53 >> >> Strange behavior of the timezone >> >> >> >> >> select version() >> >> version >> ======================================================================================================== >> >> PostgreSQL 9.6.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 >> (Red Hat 4.8.5-11), 64-bit >> >> Thanks >>