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-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY shortcircuit=no autolearn=ham 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 3B08A1F4B4 for ; Mon, 28 Dec 2020 14:04:18 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 424E2120AE5; Mon, 28 Dec 2020 23:03:29 +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 9C895120A39 for ; Mon, 28 Dec 2020 23:03:27 +0900 (JST) Received: by filterdrecv-p3iad2-74bd9fb996-cvjfp with SMTP id filterdrecv-p3iad2-74bd9fb996-cvjfp-19-5FE9E5DA-C4 2020-12-28 14:04:10.995724562 +0000 UTC m=+1522913.863107287 Received: from herokuapp.com (unknown) by geopod-ismtpd-2-2 (SG) with ESMTP id 2b8EJN1LTHaIeF3yNI730w for ; Mon, 28 Dec 2020 14:04:10.962 +0000 (UTC) Date: Mon, 28 Dec 2020 14:04:11 +0000 (UTC) From: nobu@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 77682 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 17485 X-Redmine-Issue-Author: nobu X-Redmine-Sender: nobu 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-SG-EID: =?us-ascii?Q?q8Dly+pU2+3ektTtZVXgZtbJPXwqo7p86jCsvYTW4Bw9G6+edw57xTYZnwfiF7?= =?us-ascii?Q?s0NsWIebGBEVQTN6VJIw+uduqT1SxeLN0ySB8iH?= =?us-ascii?Q?rDpMHKR=2Fbi8BHSszMMdvGUZ8+Uqk124Rv8NqyNg?= =?us-ascii?Q?UT1njNgZq5pOIPXHr+2QNnrFtc=2FDHnIrZleY2K1?= =?us-ascii?Q?iCYHSWvX8AqlYfvjVqRcO6ZZ3rmp0F9lmxIruvv?= =?us-ascii?Q?SxrAJHYaj6xIYs=2F=2Fk=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 101780 Subject: [ruby-core:101780] [Ruby master Feature#17485] Keyword argument for timezone in Time.new X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #17485 has been reported by nobu (Nobuyoshi Nakada). ---------------------------------------- Feature #17485: Keyword argument for timezone in Time.new https://bugs.ruby-lang.org/issues/17485 * Author: nobu (Nobuyoshi Nakada) * Status: Open * Priority: Normal ---------------------------------------- Currently, `Time.at` and `Time.now` accept a timezone as a keyword argument, but not `Time.new`. This means minor arguments cannot be omitted for `Time.new`. ```ruby Time.new(2021, 1, 1, 0, 0, 0, "+09:00") #=> ok: 2021-01-01 00:00:00 +0900 Time.new(2021, 1, 1, "+09:00") #=> bad: 2021-01-01 09:00:00 +0900 Time.new(2021, 1, "+09:00") #=> bad: 2021-01-09 00:00:00 +0900 Time.new(2021, "+09:00") #=> ArgumentError (mon out of range) ``` Suggest that Time.new should also accept the `in:` timezone option. -- https://bugs.ruby-lang.org/