From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 1A7761F44D for ; Sun, 7 Apr 2024 05:54:20 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=nfxweopl; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=FQ0xzJCt; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 96A01813D7; Sun, 7 Apr 2024 05:54:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1712469251; bh=4hytiCOpxqkDe/ksG8Gfp0m3hB+HvGIaFVrxI1FGpR0=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=nfxweoplR7j4Xn41OflPqbYdMoTIOQdZp0Pmeqf32e2nM6VJN1oVm5OnN96oFyOGW vqcj07D2vf4b5VmdCm7nRIeIxIXFBSWbrl1+CFrArvKFvvtHFySr4pMlE7PztfWeCU ZwK1hCPV/qLsFLGPwi7OYcWkzuATYfEtJAFxIZRM= Received: from s.wrqvtzvf.outbound-mail.sendgrid.net (s.wrqvtzvf.outbound-mail.sendgrid.net [149.72.126.143]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 877EC8139F for ; Sun, 7 Apr 2024 05:54:08 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=FQ0xzJCt; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=87ArC3Bw9Dp95HoHsi4zR2CrNVhKfVSek6WTwvd+5so=; b=FQ0xzJCtiz3PtKAvU/XMjrNNWIJ8ZtjTYDCscKMjvE7jNPYBt3oiyhd81LqAO7K4IDfd LybcJWfpcD5ZFMp0sG3QmnZUWXpAWL1PzdVLVORhLDhNT3bkorCiSHqkE6D11//k8sxPgJ W/gZga/6c43X2bKI9rrodXW+Bz2xhaakIZ0K2Z4020fPpdy7MM2eUQXF+LhgElt7duiRtT /n5pvSygJtr/DaetrerLEzT0YXo7Yvq5TqR6WleCahj7O7rdiDQ8nQxD6fu3HtQvhzxdXU Fv85MXUtz6vsAnjYYtd3g6Gle5Ezj+5NNjdMI4OZgKcqy7Dy5gEH/Je1qRzWnFRw== Received: by recvd-75c664ffc8-r52rb with SMTP id recvd-75c664ffc8-r52rb-1-661234FE-1D 2024-04-07 05:54:06.890151778 +0000 UTC m=+1673668.944591891 Received: from herokuapp.com (unknown) by geopod-ismtpd-0 (SG) with ESMTP id 35ktQhj0SVeLWSBdMY6vmA for ; Sun, 07 Apr 2024 05:54:06.850 +0000 (UTC) Date: Sun, 07 Apr 2024 05:54:06 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 20327 X-Redmine-Issue-Author: davekaro X-Redmine-Issue-Priority: Normal X-Redmine-Sender: nagachika X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 94046 X-SG-EID: =?us-ascii?Q?u001=2E44VQVH0G4ktThU9FFZyDXb=2FoLGKi0xg3KhKXpO+IAEE5wRGZS=2FaUmrCxU?= =?us-ascii?Q?vRSr0kI+o91vm0PKZJNpskxVPGLEUY0z2=2FFYkjb?= =?us-ascii?Q?KjL91GsNRUBlCD6Q+HgnKSXKnJHEJYVIJLEGo=2Fv?= =?us-ascii?Q?RD4NjNtL1oJvvTyPc94wHjOFXPda4GH1u4xsFOT?= =?us-ascii?Q?96m=2F1+3krYq9LsNknlMzCJIUfPdtVUXkXYEU+jj?= =?us-ascii?Q?h0BVLh3Pyb5l6LxNC5JaUzcXEHR57QpPJ9uhz+t?= =?us-ascii?Q?e5INZx+bFgOj8taT=2FjvM=2F5BgMg=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: NAF7R4L5GSK2SO4HKFJMACDW4KZ3JSXA X-Message-ID-Hash: NAF7R4L5GSK2SO4HKFJMACDW4KZ3JSXA X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:117451] [Ruby master Bug#20327] Time.new behaves differently when passing a zone as timezone object List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "nagachika (Tomoyuki Chikanaga) via ruby-core" Cc: "nagachika (Tomoyuki Chikanaga)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20327 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED, 3.3: DONE to 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE, 3.3: DONE ruby_3_2 e6bf38a6e7fbae0097fdf51e3c752820a2c58ae4 merged revision(s) d3279a0c11ca45ca85027e7eb74dc4aac52c478b. ---------------------------------------- Bug #20327: Time.new behaves differently when passing a zone as timezone object https://bugs.ruby-lang.org/issues/20327#change-107835 * Author: davekaro (Dave Kroondyk) * Status: Closed * ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23] * Backport: 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE, 3.3: DONE ---------------------------------------- Time.new with a timezone object for the zone argument produces incorrect utc_offset when passing seconds as a Rational. ``` ruby require "tzinfo" # This correctly outputs 0 as the utc_offset puts Time.new(2024, 1, 1, 23, 59, 59.9r, "UTC").utc_offset # => 0 # Inspecting the time looks correct puts Time.new(2024, 1, 1, 23, 59, 59.9r, "UTC").inspect # => "2024-01-01 23:59:59.9 UTC" # Using a timezone object for the zone, results are different puts Time.new(2024, 1, 1, 23, 59, 59.9r, TZInfo::Timezone.get("Etc/UTC")).utc_offset # => (9/10) # Inspecting the time object reveals the odd offset puts Time.new(2024, 1, 1, 23, 59, 59.9r, TZInfo::Timezone.get("Etc/UTC")).inspect # => "2024-01-01 23:59:59.9 +000001" ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/