FAQ
Read the specification for the format strings again. The docs are
clear about how to do that, but people often miss the important detail
that it is a _reference_ time in the layout, not any old time.

-rob

On Fri, Oct 3, 2014 at 12:57 PM, Lobatt wrote:
Hi, golang-nuts,

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 uses the date/timeSevenPropertyModel, with no properties except
·timezoneOffset· permitted to be absent. The ·timezoneOffset· property
remains ·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.
--
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.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedOct 3, '14 at 7:57p
activeOct 3, '14 at 8:15p
posts3
users2
websitegolang.org

2 users in discussion

Lobatt: 2 posts Rob Pike: 1 post

People

Translate

site design / logo © 2021 Grokbase