Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Convert An Epoch Seconds Number To A Human Readable Datetime In Python

Quick converter to move epoch seconds to a date time.

Code

import time

  epoch_seconds = 1614450472

  my_time = time.strftime('%Y-%d-%m %H:%M:%S', time.localtime(epoch_seconds))

  print(my_time)

Results

2021-27-02 13:27:52

via: https://stackoverflow.com/a/12400584/102401

** TKTKTKTK

- Determine if it translates to local timezone or GMT