052aa55d34
There are no longer two separate projects living inside the horizon repository. There is a single project now with a single setup.py, single README, etc. The openstack-dashboard/dashboard django project is now named "openstack_dashboard" and lives as an example project in the topmost horizon directory. The "horizon/horizon" directory has been bumped up a level and now is directly on the path when the root horizon directory is on your python path. Javascript media which the horizon module directly relies upon now ships in the horizon/static dir rather than openstack-dashboard/dashboard/static. All the corresponding setup, installation, build, and env scripts have been updated accordingly. Implements blueprint unified-packaging. Change-Id: Ieed8e3c777432cd046c3e0298869a9428756ab62
29 lines
679 B
Python
29 lines
679 B
Python
import datetime
|
|
|
|
|
|
def time(hour=0, minute=0, second=0, microsecond=0):
|
|
'''Overrideable version of datetime.datetime.today'''
|
|
if time.override_time:
|
|
return time.override_time
|
|
return datetime.time(hour, minute, second, microsecond)
|
|
|
|
time.override_time = None
|
|
|
|
|
|
def today():
|
|
'''Overridable version of datetime.datetime.today'''
|
|
if today.override_time:
|
|
return today.override_time
|
|
return datetime.date.today()
|
|
|
|
today.override_time = None
|
|
|
|
|
|
def utcnow():
|
|
'''Overridable version of datetime.datetime.utcnow'''
|
|
if utcnow.override_time:
|
|
return utcnow.override_time
|
|
return datetime.datetime.utcnow()
|
|
|
|
utcnow.override_time = None
|