Commit 55540f1 1 parent aced887 commit 55540f1 Copy full SHA for 55540f1
File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
[project ]
2
2
name = " dht22-webui"
3
- version = " 1.0.0 "
3
+ version = " 1.0.1 "
4
4
description = " DHT22 Sensor monitoring system"
5
5
readme = " README.md"
6
6
requires-python = " >=3.12"
Original file line number Diff line number Diff line change @@ -595,7 +595,7 @@ <h2>Historical Data</h2>
595
595
day : 'numeric' ,
596
596
hour : settings . timeFormat === '24h' ? '2-digit' : 'numeric' ,
597
597
minute : '2-digit' ,
598
- hour12 : settings . timeFormat === '12h '
598
+ hour12 : settings . timeFormat !== '24h '
599
599
} ) ;
600
600
} ;
601
601
} ) ;
@@ -668,9 +668,9 @@ <h2>Historical Data</h2>
668
668
return date . toLocaleString ( 'en-US' , {
669
669
month : 'short' ,
670
670
day : 'numeric' ,
671
- hour : 'numeric' ,
671
+ hour : settings . timeFormat === '24h' ? '2-digit' : 'numeric' ,
672
672
minute : '2-digit' ,
673
- hour12 : true
673
+ hour12 : settings . timeFormat !== '24h'
674
674
} ) ;
675
675
} ,
676
676
label : function ( context ) {
@@ -689,12 +689,12 @@ <h2>Historical Data</h2>
689
689
time : {
690
690
unit : 'minute' ,
691
691
displayFormats : {
692
- minute : ' HH:mm',
693
- hour : ' HH:mm',
692
+ minute : settings . timeFormat === '24h' ? ' HH:mm' : 'hh:mm a ',
693
+ hour : settings . timeFormat === '24h' ? ' HH:mm' : 'hh:mm a ',
694
694
day : 'MMM D' ,
695
695
month : 'MMM YYYY'
696
696
} ,
697
- tooltipFormat : ' MMM D, HH:mm'
697
+ tooltipFormat : settings . timeFormat === '24h' ? ' MMM D, HH:mm' : 'MMM D, hh:mm a '
698
698
} ,
699
699
grid : {
700
700
display : false
You can’t perform that action at this time.
0 commit comments