Skip to content

Commit

Permalink
rm if branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ychiucco committed Aug 30, 2024
1 parent ec9dac6 commit d8ddc71
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions fractal_server/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@


def _converter(timestamp: float) -> time.struct_time:
if settings.FRACTAL_LOG_TIMEZONE is not None:
return (
datetime.datetime.fromtimestamp(timestamp)
.astimezone(ZoneInfo(settings.FRACTAL_LOG_TIMEZONE))
.timetuple()
)

else:
return time.localtime(timestamp)
return (
datetime.datetime.fromtimestamp(timestamp)
.astimezone(ZoneInfo(settings.FRACTAL_LOG_TIMEZONE))
.timetuple()
)


class FractalLoggingFormatter(logging.Formatter):
Expand Down

0 comments on commit d8ddc71

Please sign in to comment.