from common.db.db import dbOP
import datetime
from datetime import timedelta, date

# 数据读入和写入文件
class timeUtils(object):

    def get_time_hms(self):
        '''2023-05-06 09:39:30'''
        import time
        t = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        return t

    def get_time_add(self,days_aa):
        import time
        # t = time.strftime("%Y-%m-%d", datetime.datetime.now())
        t = (date.today() + timedelta(days=days_aa)).strftime("%Y-%m-%d %H:%M:%S")
        return t