summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorzed <isidore.john.r@gmail.com>2020-11-15 17:09:31 +0300
committerGitHub <noreply@github.com>2020-11-15 15:09:31 +0100
commit21bb0822c7d30adc1e144e87d730cd67eb4fa828 (patch)
tree23f1da560b0f6904525ea002825e5712be363970 /README.rst
parent8fc5ed1b20c9c9fab75164aae1984698a46974dc (diff)
downloadpsutil-21bb0822c7d30adc1e144e87d730cd67eb4fa828.tar.gz
remove misleading "in UTC" (#1882)
"seconds since the epoch" (value returned by `time.time()`) doesn't depend on the local time zone. It is the same time instance around the world. It is not in any particular time zone: ```python import datetime as DT import zoneinfo local_time = DT.datetime.fromtimestamp(seconds_since_epoch) # naive datetime object representing local time utc_time = DT.datetime.utcfromtimestamp(seconds_since_epoch) # naive datetime object representing utc time la_time = DT.datetime.fromtimestamp(seconds_since_epoch, zoneinfo.ZoneInfo("America/Los_Angeles")) # timezone aware dt ``` Here `local_time`, `utc_time`, `la_time` may correspond to different clock times but it is exactly the same time instance.
Diffstat (limited to 'README.rst')
0 files changed, 0 insertions, 0 deletions