Closed lo-zed closed 2 years ago
I looked at the CSV output files from qdownload you provided with EST and UTC and they have a 4 hour difference, and it seems that this is the correct time zone offset for EST at that date: https://www.timeanddate.com/worldclock/converter.html?iso=20210517T080000&p1=179&p2=tz_gmt
Maybe the compare code use the wrong time zone?
You're right. My mistake was to use pytz.timezone('EST')
instead of pytz.timezone('America/New_York')
which contains DST (daylight saving transitions) information, whereas EST doesn't.
Changing the code to that timezone produces correct results.
problem
When downloading the same data from iqfeed with different timezones, e.g.
-z UTC
vs without option, there is a one hour time difference.architecture
Ubuntu 20.04 LTS minimal, x86_64
steps to reproduce
and run attached python script.
sample output
tz_investigation.zip