I have the time in this format:
Fri, 19 Dec 2014 03:55:24
and I want to convert it to a 4 byte hexadecimal value. My question is similar to this one: question, but the difference is that I have a different format, and I use the gmtime()
function because I want the date since the Epoch. This is what I tried so far (by trying to break the code from the answer of the similar question into smaller parts):
ut = time.strftime("%a, %d %b %Y %H:%M:%S ", time.gmtime())
time.strptime(ut, '%a, %d %b %Y %H:%M:%S')
But I get the error:
ValueError: uncoverted data remains:
Could you please help me? I know that it is a simple question, but I cannot see what is the problem.