feat(backend): log client timezone offset

This commit is contained in:
Moriz Wahl 2022-12-01 17:44:56 +01:00
parent e458a7dd8d
commit d3678bb81c

View File

@ -103,6 +103,9 @@ export const getUserCreation = async (
const getCreationMonths = (timezoneOffset: number): number[] => {
const clientNow = new Date()
clientNow.setTime(clientNow.getTime() - timezoneOffset * 60 * 1000)
logger.info(
`getCreationMonths -- offset: ${timezoneOffset} -- clientNow: ${clientNow.toISOString()}`,
)
return [
new Date(clientNow.getFullYear(), clientNow.getMonth() - 2, 1).getMonth() + 1,
new Date(clientNow.getFullYear(), clientNow.getMonth() - 1, 1).getMonth() + 1,