文章标签 » datetime

python产生GMT格式日期时间

#缓存一天
exp = datetime.timedelta(seconds=86400)
now = datetime.datetime.utcnow()
req.setHeader('Cache-Control', 'max-age=86400')
req.setHeader('Expires', (now + exp).strftime('%a, %d %b %Y %H:%M:%S GMT'))

———–
post by Email~