0

I have following timestamp generated by a c++ app for recording files: `

3557588270.0

I want to convert this timestamp in python, with

datetime.utcfromtimestamp(3557588270.0).strftime('%Y-%m-%d %H:%M:%S')

but the result is:

2082-09-25 18:57:50

and the result should be:

2019-12-06 09:19:..

Any suggestions will be appreciated!

1
  • I forgot one important fact: in the documentation of the recording application, the timestamp is given as: Time stamp in UNITS (10000000 per second) The link to the documentation Commented Dec 11, 2019 at 13:24

1 Answer 1

1

Your problem is not on the conversion. The problem is that your input value (3557588270) does not lead to your expected datetime value, as you can see on this site

Sign up to request clarification or add additional context in comments.

4 Comments

I cannot change the input value, which comes from recording videos in binary format.
@AlexPab it seems that the error comes from there... Probably the recorder was set on the wrong datetime in such a way. For sure 3557588270.0 leads to 2082-09-25 18:57:50
@AlexPab do you know what's the meaning of timestampMedia? Can you retrieve its value?
Unfortunately I cannot retrieve the timestampMedia data... I only have the timestamp value for every frame...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.