mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 10:02:28 +00:00
Fixes time on modular computers (#10705)
This commit is contained in:
4
html/changelogs/dsdsd.yml
Normal file
4
html/changelogs/dsdsd.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
author: Karolis2011
|
||||
delete-after: True
|
||||
changes:
|
||||
- bugfix: "Computer clock now should show correct time."
|
||||
@@ -36,7 +36,7 @@ const HOUR = 36000
|
||||
const MINUTE = 600
|
||||
|
||||
export function worldtime2text(time, timeshift = true) {
|
||||
const offset = timeshift ? Store.state.roundstart_hour + 2 : 0
|
||||
const offset = timeshift ? Store.state.roundstart_hour : 0
|
||||
const hour = Math.floor((time / HOUR + offset) % 24)
|
||||
const minute = Math.floor(time % HOUR / MINUTE)
|
||||
return `${('0' + hour).slice(-2)}:${('0' + minute).slice(-2)}`
|
||||
|
||||
Reference in New Issue
Block a user