chrono icon indicating copy to clipboard operation
chrono copied to clipboard

How to ignore zero padding for parsing the timezone offset?

Open sueskind opened this issue 1 year ago • 1 comments

I want to parse the following example string: "03:00 +3" where +3 is the timezone offset, i.e. the format %#z or %:::z but without leading zeros.

I have already tried the format specifiers

  • %z, %:z, %::z, %:::z and %#z
  • %-z, %-:z, %-::z, %-:::z and %-#z

but I always get either premature end of input or bad or unsupported format string errors.

How can I specify this format?

sueskind avatar May 09 '23 12:05 sueskind