Permalink
Browse files

Use the RFC3339 time parser instead of RFC3339Nano

This is what is used internally and seems to do the right thing.

Closes #43
  • Loading branch information...
1 parent 594fb3c commit e4ed470f8e18f80f03e3187d26c5f4499d5819e6 @dustin dustin committed Sep 18, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 heartbeat.go
  2. +1 −1 heartbeat_test.go
View
2 heartbeat.go
@@ -337,7 +337,7 @@ func checkStaleNodes() error {
log.Printf("Wrong key type returned from view: %#v", r)
continue
}
- t, err := time.Parse(time.RFC3339Nano, ks)
+ t, err := time.Parse(time.RFC3339, ks)
if err != nil {
log.Printf("Error parsing time from %v", r)
continue
View
2 heartbeat_test.go
@@ -37,7 +37,7 @@ func TestNodeAddresses(t *testing.T) {
}
func TestDateParsing(t *testing.T) {
- tm, err := time.Parse(time.RFC3339Nano,
+ tm, err := time.Parse(time.RFC3339,
"2012-09-17T22:12:09.894702Z")
if err != nil {
t.Fatalf("Error parsing time: %v", err)

0 comments on commit e4ed470

Please sign in to comment.