from time import * print(gmtime())
这个方法运行后,获取当前时间的小时差了好多,谢谢
因为返回的是UTC时间,中国在东八区UTC+8试试使用time下的localtime函数有帮助望采纳