|
@@ -284,6 +284,18 @@ def checkInterval(start_time, end_time, need_compare_time):
|
|
|
return need_compare_time >= start_time and need_compare_time < end_time
|
|
|
|
|
|
|
|
|
+def getSelfDateStr(times=time.time(),date_format='%Y%m%d'):
|
|
|
+ """
|
|
|
+
|
|
|
+ description: 获取指定时间戳
|
|
|
+ time: 秒 默认当前时间
|
|
|
+ return: 返回指定时间戳的前一日日期 。 比如 :接收20190512号的时间戳,返回 20190513 -> str
|
|
|
+ tips: 一天86400秒
|
|
|
+ """
|
|
|
+ timestamps = str(time.strftime(date_format,time.localtime(times)))
|
|
|
+ return timestamps
|
|
|
+
|
|
|
+
|
|
|
def test():
|
|
|
print(getCurrentMilliSecondTime())
|
|
|
print(getCurrentSecondTime())
|