From 97eccbcc6aa1fae18621f705729f6428ceee629a Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 22 Jan 2018 22:01:43 +0100 Subject: buildSubmissionParams(): Change date format to U.S. The TimeTask form now requires U.S. instead of European date localisation. This swaps the date and month fields so that the month appears first. --- timetask/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timetask/http.go b/timetask/http.go index 7f5cc18..59d59a6 100644 --- a/timetask/http.go +++ b/timetask/http.go @@ -117,7 +117,7 @@ func buildSubmissionParams(time_entry TimeEntry) url.Values { v.Set( "f_date0", - time_entry.Date.Format("02/01/06"), // day/month/year + time_entry.Date.Format("01/02/06"), // month/day/year ) time_str := strconv.FormatFloat(time_entry.Time, 'f', 2, 64) -- cgit v1.2.3 From d72ad5c7264d3b31b8cbe67bd09feaec5c4f7eed Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 22 Jan 2018 22:04:50 +0100 Subject: buildSubmissionParams(): Change time format to U.S. The TimeTask form now requires U.S. localisation for the time. This means that decimal values are no longer submitted as "4,5" for four and a half hours. Instead, it must be written "4.5". --- timetask/http.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/timetask/http.go b/timetask/http.go index 59d59a6..c3b48dc 100644 --- a/timetask/http.go +++ b/timetask/http.go @@ -121,10 +121,9 @@ func buildSubmissionParams(time_entry TimeEntry) url.Values { ) time_str := strconv.FormatFloat(time_entry.Time, 'f', 2, 64) - time_european_format := strings.Replace(time_str, ".", ",", -1) v.Set( "f_time0", - time_european_format, + time_str, ) var billable string -- cgit v1.2.3