.
D 2004-11-29T18:08:54
J assignee dkf
J cmimetype text/plain
J comment The\sman\spages\sfor\sclock\sscan\scommand\simplies\sthat\syou\s\ncan\sread\sa\sISO\s8601\spoint-in-time\sspecifications.\sI\s\nlooked\sat\sthe\sspecification\sand\sexamples\sfrom\s,\s\nhttp://www.w3.org/TR/NOTE-datetime\s,\sand\sfind\sthat\s\nnot\sall\scase\sare\sable\sto\sbe\sparsed\s(in\sTcl\s8.4.8).\s\n\nSee\stest\sthe\sresults\sbelow:\n\nYear:\n#\sYYYY\s(eg\s1997)\n%\sclock\sformat\s[clock\sscan\s1997]\n\s\s\s\sunable\sto\sconvert\sdate-time\sstring\s"1997"\n\nYear\sand\smonth:\n#\sYYYY-MM\s(eg\s1997-07)\n%\sclock\sformat\s[clock\sscan\s1997-07]\n\s\s\sunable\sto\sconvert\sdate-time\sstring\s"1997-07"\n\nComplete\sdate:\n#\sYYYY-MM-DD\s(eg\s1997-07-16)\n%\sclock\sformat\s[clock\sscan\s1997-07-16]\n\s\s\sWed\sJul\s16\s12:00:00\sAM\sEastern\sDaylight\sTime\s1997\n\s\nComplete\sdate\splus\shours\sand\sminutes:\n#\sYYYY-MM-DDThh:mmTZD\s(eg\s1997-07-\n16T19:20+01:00)\n%\sclock\sformat\s[clock\sscan\s1997-07-16T19:20+01:00]\n\s\s\sunable\sto\sconvert\sdate-time\sstring\s"1997-07-\n16T19:20+01:00"\n\n#\sbut\sif\swe\sremove\sthe\stime\szone\soffset\sit\sworks\sbut\sis\s\none\shour\sto\sfast!!!\n%\sclock\sformat\s[clock\sscan\s1997-07-16T19:20]\n\s\s\sWed\sJul\s16\s8:20:00\sAM\sEastern\sDaylight\sTime\s1997\n\n#\sremoving\sthe\sT\sgives\sus\sthe\scorrect\stime\s??\sstrange\n%\sclock\sformat\s[clock\sscan\s"1997-07-16\s19:20"]\n\s\s\sWed\sJul\s16\s7:20:00\sPM\sEastern\sDaylight\sTime\s1997\n\n#\salso\sif\swe\sremove\sthe\sdashes\sand\sleave\sthe\sT\n%\sclock\sformat\s[clock\sscan\s"19970716T19:20:00"]\n\s\s\sWed\sJul\s16\s7:20:00\sPM\sEastern\sDaylight\sTime\s1997\n\nComplete\sdate\splus\shours,\sminutes\sand\sseconds:\n#\sYYYY-MM-DDThh:mm:ssTZD\s(eg\s1997-07-\n16T19:20:30+01:00)\n%\sclock\sformat\s[clock\sscan\s1997-07-\n16T19:20:30+01:00]\n\s\s\s\sunable\sto\sconvert\sdate-time\sstring\s"1997-07-\n16T19:20:30+01:00"\n\nComplete\sdate\splus\shours,\sminutes,\sseconds\sand\sa\s\ndecimal\sfraction\sof\sa\ssecond\n#\sYYYY-MM-DDThh:mm:ss.sTZD\s(eg\s1997-07-\n16T19:20:30.45+01:00)\n%\sclock\sformat\s[clock\sscan\s1997-07-\n16T19:20:30.45+01:00]\n\s\s\sunable\sto\sconvert\sdate-time\sstring\s"1997-07-\n16T19:20:30.45+01:00"\n\nwhere:\n\sYYYY\s=\sfour-digit\syear\n\sMM\s\s\s=\stwo-digit\smonth\s(01=January,\setc.)\n\sDD\s\s\s=\stwo-digit\sday\sof\smonth\s(01\sthrough\s31)\n\shh\s\s\s=\stwo\sdigits\sof\shour\s(00\sthrough\s23)\s(am/pm\sNOT\s\nallowed)\n\smm\s\s\s=\stwo\sdigits\sof\sminute\s(00\sthrough\s59)\n\sss\s\s\s=\stwo\sdigits\sof\ssecond\s(00\sthrough\s59)\n\ss\s\s\s\s=\sone\sor\smore\sdigits\srepresenting\sa\sdecimal\sfraction\s\nof\sa\ssecond\n\sTZD\s\s=\stime\szone\sdesignator\s(Z\sor\s+hh:mm\sor\s-hh:mm)\n\n\nMike\sJacobson\[email protected]
J foundin obsolete:\s8.4.8
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 16.\sCommands\sA-H
J title clock\sscan\sdoes\snot\shandle\sall\sISO\s8601\stime\sformats
J type Bug
K 1075433fffffffffffffffffffffffffffffffff
U nobody
Z 209b4ab64b74230af51a41664e45d10b