ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
From: dmikurube@acm.org
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:50926] [Ruby master Bug#16767] Time#strftime not working correctly with a big precision on recurred formats like "%c"
Date: Tue, 07 Apr 2020 12:45:56 +0000 (UTC)	[thread overview]
Message-ID: <redmine.issue-16767.20200407124556.13693@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-16767.20200407124556.13693@ruby-lang.org>

Issue #16767 has been reported by dmikurube (Dai MIKURUBE).

----------------------------------------
Bug #16767: Time#strftime not working correctly with a big precision on recurred formats like "%c"
https://bugs.ruby-lang.org/issues/16767

* Author: dmikurube (Dai MIKURUBE)
* Status: Open
* Priority: Normal
* ruby -v: 2.7.0
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
Confirmed on: Ruby 2.6.3 and 2.7.0 on Mac OS X 10.13.

```
require 'time'
Time .now .strftime("%28c")
```

Expected:
```
"    Tue Apr  7 12:44:16 2020"
```

Actual:
```
"    \u0000ue Apr  7 12:44:16 2020"
```

Appendix:
* For `"%c"`, 26 worked, but 27+ did not work.
* Confirmed similar for other recurred formats like `"%R"`, `"%F"`, and else.




-- 
https://bugs.ruby-lang.org/

       reply	other threads:[~2020-04-07 12:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07 12:45 dmikurube [this message]
2020-07-25  2:56 ` [ruby-dev:50936] " nagachika00
2021-04-04 22:41 ` [ruby-dev:51043] " usa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.issue-16767.20200407124556.13693@ruby-lang.org \
    --to=dmikurube@acm.org \
    --cc=ruby-dev@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).