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
69
69
- Added back support for Yahoo! price, dividends, and splits data for stocks
70
70
and currency pairs (:issue:`487`).
71
71
- Add `is_list_like` to compatibility layer to avoid failure on pandas >= 0.23 (:issue:`520`)
72
+ - Fixed Yahoo! time offset (:issue:`487`).
72
73
- Fix Yahoo! quote reader (:issue: `540`)
Original file line number Diff line number Diff line change @@ -97,10 +97,17 @@ def get_actions(self):
97
97
def url (self ):
98
98
return 'https://finance.yahoo.com/quote/{}/history'
99
99
100
+ # Test test_get_data_interval() crashed because of this issue, probably
101
+ # whole yahoo part of package wasn't
102
+ # working properly
100
103
def _get_params (self , symbol ):
104
+ # This needed because yahoo returns data shifted by 4 hours ago.
105
+ four_hours_in_seconds = 14400
101
106
unix_start = int (time .mktime (self .start .timetuple ()))
107
+ unix_start += four_hours_in_seconds
102
108
day_end = self .end .replace (hour = 23 , minute = 59 , second = 59 )
103
109
unix_end = int (time .mktime (day_end .timetuple ()))
110
+ unix_end += four_hours_in_seconds
104
111
105
112
params = {
106
113
'period1' : unix_start ,
You can’t perform that action at this time.
0 commit comments