Commits

Miki Tebeka  committed bf9d592

gofix

  • Participants
  • Parent commits a2f448e

Comments (0)

Files changed (1)

 )
 
 const (
-	DAY = 24 * 60 * 60
+	DAY         = 24 * 60 * 60
 	TIME_FORMAT = "2006-01-02"
 )
 
 /* dayrange returns a channel with days (formatted as YYYY-MM-DD) from startDate to endDate. */
-func dayrange(startDate, endDate string) (chan string, os.Error) {
+func dayrange(startDate, endDate string) (chan string, error) {
 	startTime, err := time.Parse(TIME_FORMAT, startDate)
 	if err != nil {
 		return nil, err
 		return nil, err
 	}
 
-	start := startTime.Seconds()
-	end := endTime.Seconds()
+	start := startTime.Unix()
+	end := endTime.Unix()
 
 	ch := make(chan string)
 	go func() {
 		for ; start <= end; start += DAY {
-			t := time.SecondsToUTC(start)
+			t := time.Unix(start, 0).UTC()
 			ch <- t.Format(TIME_FORMAT)
 		}
 		close(ch)