diff --git a/controllers/default.go b/controllers/default.go index 199eaad..9d8561f 100644 --- a/controllers/default.go +++ b/controllers/default.go @@ -52,7 +52,15 @@ func getLastTemps() ([]SensorPrint) { horodatTmp := t.HorodateGMT horodatTmp = horodatTmp.Add(time.Duration(timezoneOffset)*time.Second) h, m, _ := horodatTmp.Clock() - sens.Horodate = strconv.Itoa(h)+"h"+strconv.Itoa(m) + hStr := strconv.Itoa(h) + if h < 10 { + hStr = "0"+hStr + } + mStr := strconv.Itoa(m) + if m < 10 { + mStr = "0"+mStr + } + sens.Horodate = hStr+"h"+mStr values = append(values, *sens) } diff --git a/views/base/navbar.html b/views/base/navbar.html index b8ffdba..559d11e 100644 --- a/views/base/navbar.html +++ b/views/base/navbar.html @@ -17,11 +17,11 @@ class="active" {{end}} >Temperatures -
  • Consommation electrique
  • + >Consommation electrique -->