#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2020/4/28 0028 下午 2:50
# @Author  : hj
# @File    : time_format.py
# @Software: PyCharm
import datetime,time
from datetime import datetime as datime2
def now_time():
    now_time = datetime.datetime.now()
    print(now_time)
    return now_time
# now_time()

def re_strf_Time(timestamp):
    if (timestamp != None):
        timeArray = time.localtime(timestamp)
        otherStyleTime = time.strftime("%Y/%m/%d", timeArray)  # %Y/%m/%d %H:%M:%S
    else:
        otherStyleTime = ''
    return otherStyleTime

# 转化时间格式
def timeGmt(time_info):
    GMT_FORMAT = '%a %b %d %Y %H:%M:%S GMT+0800 (中国标准时间) '
    time_format = datime2.strptime(time_info, GMT_FORMAT)
    return time_format

