Either use datetime.datetime.fromtimestamp or change the import to from datetime import datetime as dt and use dt.fromtimestamp.
Either use datetime.datetime.fromtimestamp or change the import to from datetime import datetime as dt and use dt.fromtimestamp.