Free markets: Generate new date for setUTCHours
This commit is contained in:
parent
3bc4e7b336
commit
2fb1c4bb11
|
@ -69,7 +69,7 @@ export const createContract = newEndpoint(['POST'], async (req, [user, _]) => {
|
||||||
|
|
||||||
// Uses utc time on server:
|
// Uses utc time on server:
|
||||||
const today = new Date()
|
const today = new Date()
|
||||||
let freeMarketResetTime = today.setUTCHours(16, 0, 0, 0)
|
let freeMarketResetTime = new Date().setUTCHours(16, 0, 0, 0)
|
||||||
if (today.getTime() < freeMarketResetTime) {
|
if (today.getTime() < freeMarketResetTime) {
|
||||||
freeMarketResetTime = freeMarketResetTime - 24 * 60 * 60 * 1000
|
freeMarketResetTime = freeMarketResetTime - 24 * 60 * 60 * 1000
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user