debugtalk.py 1.4 KB
import json
import time
# from helpfunc.db_func import *
from helpfunc.header_func import *
from helpfunc.login_func import *
from helpfunc.m_func import *
from helpfunc.pg_db_loot_func import *
from helpfunc.pg_db_bid_func import *
from helpfunc.pg_db_appoint_func import *
# from helpfunc.time_func import *

import time,datetime,re


from urllib.parse import *


def sleep(n_secs):
    time.sleep(n_secs)

def convert_to_string(value):
    return str(value)

def convert_to_number(value):
    return int(value)
# print(type(convert_to_number(get_resource_id())))
# def get_base_url(env_type="test"):
#     """
#     根据配置选择运行环境
#     :param env_type:
#     :return:
#     """
#     if env_type == "test":
#         return "https://ability-test.fjmaimaimai.com"
#     else:
#         return "https://ability-prod.fjmaimaimai.com"

def get_nowtime():
    return time.strftime("%Y%m%d%H%M%S",time.localtime(time.time()))


def get_second():
    curr_time = datetime.datetime.now()
    return  curr_time.second

def get_tomorrow():
    td = datetime.timedelta(days=1)
    tomorrow = (datetime.datetime.utcnow() + td).strftime("%Y-%m-%dT%H:%M:%SZ")
    return tomorrow

def get_today1():
    td = datetime.timedelta(days=0)
    tomorrow = (datetime.datetime.utcnow() + td).strftime("%Y-%m-%dT%H:%M:%SZ")
    return tomorrow

def add(x, y):
    return str(int(x)+y)