File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -69,4 +69,5 @@ Bug Fixes
6969- Added back support for Yahoo! price, dividends, and splits data for stocks
7070 and currency pairs (:issue:`487`).
7171- Add `is_list_like` to compatibility layer to avoid failure on pandas >= 0.23 (:issue:`520`)
72+ - Fixed Yahoo! time offset (:issue:`487`).
7273- Fix Yahoo! quote reader (:issue: `540`)
Original file line number Diff line number Diff line change @@ -97,10 +97,17 @@ def get_actions(self):
9797 def url (self ):
9898 return 'https://finance.yahoo.com/quote/{}/history'
9999
100+ # Test test_get_data_interval() crashed because of this issue, probably
101+ # whole yahoo part of package wasn't
102+ # working properly
100103 def _get_params (self , symbol ):
104+ # This needed because yahoo returns data shifted by 4 hours ago.
105+ four_hours_in_seconds = 14400
101106 unix_start = int (time .mktime (self .start .timetuple ()))
107+ unix_start += four_hours_in_seconds
102108 day_end = self .end .replace (hour = 23 , minute = 59 , second = 59 )
103109 unix_end = int (time .mktime (day_end .timetuple ()))
110+ unix_end += four_hours_in_seconds
104111
105112 params = {
106113 'period1' : unix_start ,
You can’t perform that action at this time.
0 commit comments