From: "andrykonchin (Andrew Konchin)" Date: 2022-11-01T17:49:20+00:00 Subject: [ruby-core:110574] [Ruby master Bug#19098] Time#strftime: %z and width Issue #19098 has been reported by andrykonchin (Andrew Konchin). ---------------------------------------- Bug #19098: Time#strftime: %z and width https://bugs.ruby-lang.org/issues/19098 * Author: andrykonchin (Andrew Konchin) * Status: Open * Priority: Normal * ruby -v: 3.1.2p20 * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- It seems `%z` behaves in some surprising way when it is combined with width - sign `+` is placed at the beginning of the result string: ```ruby Time.now.strftime("%10z") => "+000000200" Time.now.strftime("%_10z") => " +200" ``` -- https://bugs.ruby-lang.org/ Unsubscribe: