Skip to content

Commit

Permalink
fix: time
Browse files Browse the repository at this point in the history
  • Loading branch information
Angular2Guy committed Apr 14, 2024
1 parent 85bb607 commit 3a8317b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export default function Main() {
timeSlots.push(...myJson1.filter(myValue => myValue.AvgDiesel > 10).map(myValue => {
const dieselTimeSlot = {x: '00.00', diesel: 0, e10: 0, e5: 0} as TimeSlot;
const myDate = new Date(myValue.StartDate);
dieselTimeSlot.x = ''+myDate.getHours()+':'+myDate.getMinutes();
dieselTimeSlot.x = ''+myDate.getHours()+':'+(myDate.getMinutes().toString().length < 2 ? myDate.getMinutes().toString().length +'0': myDate.getMinutes());
dieselTimeSlot.diesel = myValue.AvgDiesel/1000;
dieselTimeSlot.e10 = myValue.AvgE10/1000;
dieselTimeSlot.e5 = myValue.AvgE5/1000;
Expand Down

0 comments on commit 3a8317b

Please sign in to comment.