pilwon / node-yahoo-finance

Yahoo Finance historical quotes and snapshot data downloader written in Node.js
491 stars 123 forks source link

parse date as America/New_York #32

Closed carlhopf closed 7 years ago

carlhopf commented 7 years ago

dates from yahoo-finance api should be considered eastern time (nasdaq stock exchange).

if parsing as local time, people in other timezones may end up with invalid timestamps

pilwon commented 7 years ago

@carlhopf Thanks- Published as v0.2.16

carlhopf commented 7 years ago

i'm also guessing:

for each stock-symbol-suffix listed here https://help.yahoo.com/kb/SLN2310.html the correct timezone-identifier would need to be used, to parse the reported date string (like '2016-10-21') as local time per stock exchange.

atleast for now using America/New_York is more correct then just defaulting to the user's local timezone.

pilwon commented 7 years ago

@carlhopf Sounds great, and thanks for this PR!