0
for i in data:
        End_Date = i.end_date
        a = int(End_Date)/1000.0

        b = a - 2629743.0
        DateTimeStamp=int(time.time()) 
        if b >= DateTimeStamp:
            mes = "Good to GO" 
        else:
            mes = "Academic year yet to complete"
        Edate = str(datetime.fromtimestamp(int(End_Date)/1000.0).strftime('%d-%m-%Y'))

错误行:- Edate = str(datetime.fromtimestamp(int(End_Date)/1000.0).strftime('%d-%m-%Y'))

ValueError:平台 time_t 的时间戳超出范围

我无法解决这个问题。我尝试使用

Edate = time.strftime('%m/%d/%Y',  time.gmtime(int(End_Date)/1000.0))

但它仍然显示相同的错误

4

0 回答 0