Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"US/Eastern" vs. "EST" time zone in Python

It is 2022/06/28 actually 28th of June 2022; I noticed when I try to get the current time from Python console two different results are possible the Eastern Time (Toronto, Montreal and New York). So what is the difference between these two parameters? I am going to answer the question:

like image 497
Farzad Amirjavid Avatar asked Dec 02 '25 17:12

Farzad Amirjavid


1 Answers

"EST" is not accurate if you want to get the current time in New York because it represents Eastern Standard Time (UTC-05:00), which is one hour behind Eastern Daylight Time (UTC-04:00). Due to daylight savings, New York will observe either EST or EDT depending on the time of year.

"US/Eastern" is preferable to "EST" as it represents the Eastern Time Zone in the United States and will account for any shifts due to daylight savings. However, the zone representing "US/Eastern" has been renamed to "America/New_York", and is maintained for backwards compatibility.

like image 198
gloo Avatar answered Dec 05 '25 05:12

gloo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!