diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-04-21 09:24:48 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-04-21 09:24:49 +0000 |
commit | 879799b3fd65559bcaf2bf36381cc3dd70b54eba (patch) | |
tree | 1862210eefa590dc7fb6faaa996ca7bd993311fb | |
parent | fb8653f8ed8b2fe0fa480ed7aee9fd4942dc00c3 (diff) | |
parent | bc0253d762a2fdde669bbf1feffa9970884882a5 (diff) | |
download | horizon-879799b3fd65559bcaf2bf36381cc3dd70b54eba.tar.gz |
Merge "Fix an error which cause on Feb 29 in user setting" into stable/liberty
-rw-r--r-- | openstack_dashboard/dashboards/settings/user/forms.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openstack_dashboard/dashboards/settings/user/forms.py b/openstack_dashboard/dashboards/settings/user/forms.py index adf965640..55022205f 100644 --- a/openstack_dashboard/dashboards/settings/user/forms.py +++ b/openstack_dashboard/dashboards/settings/user/forms.py @@ -13,6 +13,7 @@ # under the License. from datetime import datetime # noqa +from datetime import timedelta # noqa import string import babel @@ -30,8 +31,7 @@ from horizon import messages def _one_year(): now = datetime.utcnow() - return datetime(now.year + 1, now.month, now.day, now.hour, - now.minute, now.second, now.microsecond, now.tzinfo) + return now + timedelta(days=365) class UserSettingsForm(forms.SelfHandlingForm): |