From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.5 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR,UNPARSEABLE_RELAY,URIBL_GREY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 08EFB1F54E for ; Mon, 8 Aug 2022 03:02:49 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sendgrid.me header.i=@sendgrid.me header.b="xAA84Od3"; dkim-atps=neutral Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id E50491210E2; Mon, 8 Aug 2022 12:02:43 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id CC45C120ED4 for ; Mon, 8 Aug 2022 12:02:41 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sendgrid.me; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc; s=smtpapi; bh=ktpMdgulX+roYOR+D0b4tduzxo62k12Z2MHiCocx8Dg=; b=xAA84Od3EHNRON0Xv08N46oRMT7GWQoueSSP41DEIGns3oXtVBbeFgNQ5kGp7LS8bMHx P5YUFzCgFlcXADMMqdhzY1tyqWg7uEht168H7I233up1nVwW+XcEbbpOgpOn/StsLr99wM JeREPgFcO5uoIYBlBfAVJ68SJ/0Lcun3I= Received: by filterdrecv-846bc987b5-7cptn with SMTP id filterdrecv-846bc987b5-7cptn-1-62F07CCD-43 2022-08-08 03:02:37.745028557 +0000 UTC m=+1493889.937412606 Received: from herokuapp.com (unknown) by geopod-ismtpd-6-2 (SG) with ESMTP id Jt6yCVTESIOkE2p3jRi68g for ; Mon, 08 Aug 2022 03:02:37.687 +0000 (UTC) Date: Mon, 08 Aug 2022 03:02:37 +0000 (UTC) From: "matz (Yukihiro Matsumoto)" Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 18946 X-Redmine-Issue-Author: kei-p X-Redmine-Sender: matz 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: 85851 X-SG-EID: =?us-ascii?Q?SqOeWfVKFgkgw8cVgc6MYslIG5ZBbSbWU3opJ5u4yBsU3yWoizgPd1Pss4ZMTd?= =?us-ascii?Q?OLBRodnvQO26=2FFyqng1x72rdTkbmTHg5l1+yKA9?= =?us-ascii?Q?AQWjb6aEXLeT09PWjtOFo1jr3seaycpBipEVlOp?= =?us-ascii?Q?wM+kxMJpSg4jTwMBcZZBU0VNYMDwgpVCv3G2OCs?= =?us-ascii?Q?k0uYVq40O8JNLcReeGngFd+tjYpsttU5UTZAY22?= =?us-ascii?Q?il0DXxOJ3hEpLfzRBrOUyGm=2FP5ND3X8qdakpb5n?= =?us-ascii?Q?CCUycnLe28gsFUEUeFDDw=3D=3D?= To: ruby-dev@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-dev X-Mail-Count: 51192 Subject: [ruby-dev:51192] [Ruby master Bug#18946] Time#to_date returns incorrect date X-BeenThere: ruby-dev@ruby-lang.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Ruby developers \(Japanese\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Reply-To: "Ruby developers \(Japanese\)" Errors-To: ruby-dev-bounces@ruby-lang.org Sender: "ruby-dev" Issue #18946 has been updated by matz (Yukihiro Matsumoto). I checked commit history and found out that to_date has been use GREGORIAN calendar since 2011-05-31 and to_datetime preserved the old DEFAULT_SG (ITALY). I assume this is a mistake and both should use GREGORIAN (ext/date/date_core.c:8647). Matz. ---------------------------------------- Bug #18946: Time#to_date returns incorrect date https://bugs.ruby-lang.org/issues/18946#change-98596 * Author: kei-p (Keisuke Ishizawa) * Status: Open * Priority: Normal * ruby -v: 3.1.2 * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- Time#to_date returns incorrect date. Actual Behavior: ``` Time.local(1499, 12, 27).to_date => # ``` Expected Behavior: ``` Time.local(1499, 12, 27).to_date => # ``` -- https://bugs.ruby-lang.org/