Skip to content

Commit

Permalink
fix: fix 12-hour time format in ETA output (#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou authored Nov 28, 2023
1 parent 0ecd818 commit c09ba2f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/store/printer/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,7 @@ export const getters: GetterTree<PrinterState, RootState> = {

if (hours12Format && h > 11) am = false
if (hours12Format && h > 12) h -= 12
if (hours12Format && h == 0) h += 12
if (h < 10) h = '0' + h

const m = date.getMinutes() >= 10 ? date.getMinutes() : '0' + date.getMinutes()
Expand Down

0 comments on commit c09ba2f

Please sign in to comment.