~devcamcar/horizon/trunk

« back to all changes in this revision

Viewing changes to django-openstack/src/django_openstack/utils.py

Unit tests for django-openstack.models

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import datetime
 
2
 
 
3
def utcnow():
 
4
    '''Overridable version of datetime.datetime.utcnow'''
 
5
    if utcnow.override_time:
 
6
        return utcnow.override_time
 
7
    return datetime.datetime.utcnow()
 
8
 
 
9
utcnow.override_time = None