I'd like to transform -238204800 seconds to "1962:06:15 00:00:00", using python 3.8. My code is : from time import strftime, localtime secs = -238204800 print(strftime("%Y:%m:%d %H:%M:%S", localtime(secs)) localtime() gives OSError: [Errno 22] Invalid argument. How can I proceed such dates, given negative seconds ? Continue reading...