File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ Release Notes
3
3
4
4
*September 25, 2017 *
5
5
6
+ 1.5.76
7
+ -----------
8
+ - Fixed possible miscalculation of local machine's timezone (hotfix)
9
+
6
10
1.5.75
7
11
-----------
8
12
- Futures spec is now downloading from `qtpylib.io <http://qtpylib.io/resources/futures_spec.csv >`_ (updated daily)
Original file line number Diff line number Diff line change 19
19
# limitations under the License.
20
20
#
21
21
22
- __version__ = '1.5.75 '
22
+ __version__ = '1.5.76 '
23
23
__author__ = 'Ran Aroussi'
24
24
25
25
from . import *
Original file line number Diff line number Diff line change @@ -439,11 +439,11 @@ def after_third_friday(day=None):
439
439
# =============================================
440
440
441
441
def get_timezone (as_timedelta = False ):
442
- """ utility to get the machine's timeozone """
442
+ """ utility to get the machine's timezone """
443
443
try :
444
- offset_hour = - (datetime . datetime . now () - datetime . datetime . utcnow ()). seconds
444
+ offset_hour = - (time . altzone if time . daylight else time . timezone )
445
445
except :
446
- offset_hour = time . altzone if time . daylight else time . timezone
446
+ offset_hour = - ( datetime . datetime . now () - datetime . datetime . utcnow ()). seconds
447
447
448
448
offset_hour = offset_hour // 3600
449
449
offset_hour = offset_hour if offset_hour < 10 else offset_hour // 10
Original file line number Diff line number Diff line change 20
20
21
21
setup (
22
22
name = 'QTPyLib' ,
23
- version = '1.5.75 ' ,
23
+ version = '1.5.76 ' ,
24
24
description = 'Quantitative Trading Python Library' ,
25
25
long_description = long_description ,
26
26
url = 'https://github.com/ranaroussi/qtpylib' ,
You can’t perform that action at this time.
0 commit comments