I just found that there is a issue with time.Parse().
code sample: http://play.golang.org/p/O8Af6MDzuT
There is a discrepancy between the layout supported by time.Parse
(time.RFC3339) and xml schema dateTime definition:
http://www.w3.org/TR/xmlschema11-2/#dateTime
That is, in XML schema definition:
"dateTime <http://www.w3.org/TR/xmlschema11-2/#dateTime> uses the
date/timeSevenPropertyModel
<http://www.w3.org/TR/xmlschema11-2/#dt-dt-7PropMod>, with no properties
except *·timezoneOffset·*
<http://www.w3.org/TR/xmlschema11-2/#vp-dt-timezone> permitted to be
*absent*. The *·timezoneOffset·*
<http://www.w3.org/TR/xmlschema11-2/#vp-dt-timezone> property remains ·
optional· <http://www.w3.org/TR/xmlschema11-2/#dt-optional>."
However, time.Parse() function wont work if used layout RFC3339 without tz
info.
also tried hand crafted layout like:
time.Parse("2006-09-05T13:38:26.28", "2006-09-05T13:38:26.28")
Still not working, and the error message gives out "month out of range"
Am i using it wrong or is this a limitation?
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.