是否可以以及如何将日志记录时区设置为 GMT?
(即格式中的%(asctime)s
参数)
最佳答案
logging.Formatter.converter = time.gmtime
(记录在 logging.Formatter.formatTime
的文档字符串中)
关于python - 如何在 Python 日志记录中设置 GMT/UTC 时间戳?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6321160/