From 4890e3b36ba8667487eaf09eb4ca7c7ce39139ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CXYangXRay=E2=80=9D?= <“xiaogang.yang@outlook.com”> Date: Thu, 9 May 2024 13:57:32 -0400 Subject: [PATCH] update on generic functions --- pyCHX/chx_generic_functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyCHX/chx_generic_functions.py b/pyCHX/chx_generic_functions.py index fef6168..e07777f 100644 --- a/pyCHX/chx_generic_functions.py +++ b/pyCHX/chx_generic_functions.py @@ -895,7 +895,7 @@ def get_current_time(): """get current time in a fomart of year/month/date/hour(24)/min/sec/, e.g. 2009-01-05 22:14:39 """ - loc_dt = datetime.datetime.now(pytz.timezone("US/Eastern")) + loc_dt = datetime.now(pytz.timezone("US/Eastern")) fmt = "%Y-%m-%d %H:%M:%S" return loc_dt.strftime(fmt) @@ -4939,7 +4939,7 @@ def trans_tf_to_td(tf, dtype="dframe"): ind = tf.index else: ind = range(len(tf)) - td = np.array([datetime.datetime.fromtimestamp(tf[i]) for i in ind]) + td = np.array([datetime.fromtimestamp(tf[i]) for i in ind]) return td