Overview
| Artifact ID: | 5c7d137e71055e188e88d61574a7ce213153cda3b73911c511171d55798c2d38 |
|---|---|
| Ticket: | dc69e5ecf04313429fd202b1906cd85bb7888f95
[clock scan] does not recognize AKST or AKDT |
| User & Date: | andy on 2018-05-21 21:06:42 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/html"
- comment changed to:
<p>[clock format -timezone :America/Anchorage] produces a timezone string of AKDT or AKST, neither of which is supported by [clock scan]. This affects both the legacy freeform and the new parsers.</p> <pre> % clock format [clock seconds] -timezone :America/Anchorage Mon May 21 11:53:41 AKDT 2018 % clock scan "Mon May 21 11:53:41 AKDT 2018" unable to convert date-time string "Mon May 21 11:53:55 AKDT 2018": syntax error (characters 19-23) % clock scan "Mon May 21 11:53:55 AKDT 2018" -format "%a %b %d %H:%M:%S %z %Y" time zone "akdt" not found % dict set ::tcl::clock::LegacyTimeZone akdt -0800 % clock scan "Mon May 21 11:53:55 AKDT 2018" -format "%a %b %d %H:%M:%S %z %Y" 1526932435 </pre> <p>As shown above, the new parser can be patched by editing $LegacyTimeZone:</p> <pre> dict set ::tcl::clock::LegacyTimeZone akdt -0800 dict set ::tcl::clock::LegacyTimeZone akst -0900 </pre> <p>The legacy parser can only be fixed by editing tclGetDate.y.</p> <ul><li><a href="http://core.tcl.tk/tcl/artifact/7159dd873c567e10?ln=534-622">New parser</a></li> <li><a href="http://core.tcl.tk/tcl/artifact/7b3b76f504f8c46f?ln=592-671">Legacy parser</a></li></ul> <p>Side note: while researching this issue, I noticed several timezones named zp[456] which do not work in the legacy freeform parser due to TclDatelex() not recognizing the trailing digit as part of the token. Not knowing anything about these timezones, I don't feel qualified to file a separate ticket on them. If any work is done in this area, I would also suggest confirming that all timezone strings that can be generated by [clock format] can also be recognized by [clock scan] using both the legacy freeform and new Tcl parsers.</p>
- foundin changed to: "8.6.8"
- is_private changed to: "0"
- login: "andy"
- priority changed to: "5 Medium"
- private_contact changed to: "662c23482b0bf6a505f39e48fb7ad43af8dee4d3"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "andy"
- subsystem changed to: "16. Commands A-H"
- title changed to: "[clock scan] does not recognize AKST or AKDT"
- type changed to: "Bug"