def fun(x):
            # 格式化一下,去掉datetime后面的毫秒值
            x = '{:%Y-%m-%d %H:%M:%S}'.format(x.time)
            return datetime.datetime.fromisoformat(x)