time_test fails
narkisr opened this issue · 3 comments
the init function seems to be failing on:
const exampleTimeString = "2012-08-28T21:24:35.37465188Z"
const milliAccuracy = "2012-08-28T21:24:35.374Z"
const secondAccuracy = "2012-08-28T21:24:35Z"
var exampleTime time.Time
func init() {
var err error
exampleTime, err = time.Parse(time.RFC3339Nano, exampleTimeString)
if err != nil {
panic(err)
}
if exampleTimeString != exampleTime.UTC().Format(time.RFC3339Nano) {
log.Panicf("Expected %v, got %v", exampleTimeString,
exampleTime.UTC().Format(time.RFC3339Nano))
}
}
It reproduces on golang play also:
http://play.golang.org/p/PMggvOZaHV
To me it looks like time.Parse is broken somehow,
Does this fail on 1.0.3? I tend to run go tip, but this is easy to work around.
Dustin Sallings
ronen notifications@github.com wrote:
the init function seems to be failing on:
const exampleTimeString = "2012-08-28T21:24:35.37465188Z" const milliAccuracy = "2012-08-28T21:24:35.374Z" const secondAccuracy = "2012-08-28T21:24:35Z" var exampleTime time.Time func init() { var err error exampleTime, err = time.Parse(time.RFC3339Nano, exampleTimeString) if err != nil { panic(err) } if exampleTimeString != exampleTime.UTC().Format(time.RFC3339Nano) { log.Panicf("Expected %v, got %v", exampleTimeString, exampleTime.UTC().Format(time.RFC3339Nano)) } }
It reproduces on golang play also:
http://play.golang.org/p/PMggvOZaHV
—
Reply to this email directly or view it on GitHub.
Yeap it reproduces on 1.0.3 as well, Iv compiled tip and it worked well so it seems to require that version.
BTW I thought about documenting the install process on Ubuntu , its not complicated but I had to fiddle with couple of things in order to get it to work.
Thanks
Ronen
Thanks for the report. I can't just lob this into goci or similar because of the libcouchstore dependency.
Any contribution you could offer would certainly be helpful. :)
On Sep 26, 2012, at 10:20, ronen notifications@github.com wrote:
Yeap it reproduces on 1.0.3 as well, Iv compiled tip and it worked well so it seems to require that version.
BTW I thought about documenting the install process on Ubuntu , its not complicated but I had to fiddle with couple of things in order to get it to work.
Thanks
Ronen—
Reply to this email directly or view it on GitHub.
dustin sallings