[Bug fix] Print horodat in index like 09h00
This commit is contained in:
parent
087c384f1f
commit
d3a366a1b7
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@
|
|||
class="active"
|
||||
{{end}}
|
||||
><a href="/view/temp">Temperatures</a></li>
|
||||
<li
|
||||
<!-- <li
|
||||
{{if .IsViewElec}}
|
||||
class="active"
|
||||
{{end}}
|
||||
><a href="/view/elec">Consommation electrique</a></li>
|
||||
><a href="/view/elec">Consommation electrique</a></li> -->
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li
|
||||
|
|
|
|||
Loading…
Reference in New Issue