# coding=utf-8
from __future__ import unicode_literals
from tornado.options import options
from library.utils.time import fmt
from pytz import UTC
from datetime import datetime


def human_readable(at, is_utc=True):
    """打印成本地时区"""
    if not at.tzinfo:
        at = at.replace(tzinfo=UTC)
    at = at.astimezone(options.tz)
    return at.strftime(fmt)


def now():
    at = datetime.now()
    at = at.replace(tzinfo=options.tz)
    return at

0e14b9142dbcc7b4e0f45c0e60e166cdf7a575de
<mask token>

<mask token>


def human_readable(at, is_utc=True):
    """打印成本地时区"""
    if not at.tzinfo:
        at = at.replace(tzinfo=UTC)
    at = at.astimezone(options.tz)
    return at.strftime(fmt)


<mask token>

<mask token>


def human_readable(at, is_utc=True):
    """打印成本地时区"""
    if not at.tzinfo:
        at = at.replace(tzinfo=UTC)
    at = at.astimezone(options.tz)
    return at.strftime(fmt)


def now():
    at = datetime.now()
    at = at.replace(tzinfo=options.tz)
    return at

from __future__ import unicode_literals
from tornado.options import options
from library.utils.time import fmt
from pytz import UTC
from datetime import datetime


def human_readable(at, is_utc=True):
    """打印成本地时区"""
    if not at.tzinfo:
        at = at.replace(tzinfo=UTC)
    at = at.astimezone(options.tz)
    return at.strftime(fmt)


def now():
    at = datetime.now()
    at = at.replace(tzinfo=options.tz)
    return at

# coding=utf-8
from __future__ import unicode_literals
from tornado.options import options
from library.utils.time import fmt
from pytz import UTC
from datetime import datetime


def human_readable(at, is_utc=True):
    """打印成本地时区"""
    if not at.tzinfo:
        at = at.replace(tzinfo=UTC)
    at = at.astimezone(options.tz)
    return at.strftime(fmt)


def now():
    at = datetime.now()
    at = at.replace(tzinfo=options.tz)
    return at
