[ruby-dev:50926] [Ruby master Bug#16767] Time#strftime not working correctly with a big precision on recurred formats like "%c"
From:
dmikurube@...
Date:
2020-04-07 12:45:56 UTC
List:
ruby-dev #50926
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/