Skip to content

Commit

Permalink
format timestamps in csv as rfc3339 with milliseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
ubergesundheit committed Dec 4, 2017
1 parent 58673fe commit ef10cc4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sensebox/sensebox.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"fmt"
"net/url"
"os"
"time"

"github.com/parnurzeal/gorequest"
)
Expand Down Expand Up @@ -116,7 +115,7 @@ func (s *senseBox) AppendCSV(path string) error {

// csv-stringify the measurements
for _, measurement := range s.measurements {
m := []string{measurement.Sensor.ID.String(), measurement.Value.String(), measurement.Timestamp.Format(time.RFC3339)}
m := []string{measurement.Sensor.ID.String(), measurement.Value.String(), measurement.Timestamp.Format("2006-01-02T15:04:05.000Z07:00")}
writer.Write(m)
}

Expand Down

0 comments on commit ef10cc4

Please sign in to comment.