I wrote a program using Python 3.0 that generated these formatted time values using the following line of code, and I recorded a lot of data with it.
I did, however, use %s
(lowercase) instead of %S
(uppercase). It doesn't seem to run on Windows and throws an error, but on my Linux devices it runs and generates an output like the one below. What does this "seconds" number represent?
I checked all the documentation for this and couldn't find what this does anywhere. I've recorded a lot of data with this and if there was a way to convert the number into seconds that would save a considerable amount of time.
Code: datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%s')
Output:
2019/08/06 10:34:1565051655