time-rs / time

The most used Rust library for date and time handling.
https://time-rs.github.io
Apache License 2.0
1.09k stars 273 forks source link

Support parsing tz abbreviations #564

Closed siler closed 1 year ago

siler commented 1 year ago

Hello,

I was updating time from version 0.1 in one of my projects and was trying to parse a timestamp with format_description! and couldn't find a way to parse tz abbreviations. This was available in previous versions of time via strftime flag %Z.

Thank you for maintaining this library.

jhpratt commented 1 year ago

Since you've closed the issue I presume you realized this, but for clarity, time 0.1 didn't really support it. The only thing that was parsed was "UTC" (or "GMT"; I can't remember), with everything else being a no-op.

Real support for formatting and parsing would be included as part of the tzdb implementation in #193. Keep in mind that even then, many abbreviations are ambiguous — "CST" could be US central time, Mexico central time, China standard time, etc.