예제 #1
0
파일: _time.py 프로젝트: nisavid/spruce-db
def current_datetime(engine):
# TODO (Python 3):
#def current_datetime(*, engine):
    """The current date and time on the database server

    The result is a time zone aware :class:`datetime.datetime` in UTC.

    :param engine:
        A database interaction engine.
    :type engine: :class:`sqlalchemy.engine.base.Engine`

    :rtype: :class:`datetime.datetime`

    """
    return _dt.datetime_from_unixtime(current_unixtime(engine=engine))