diff options
author | Tomas Babej <tbabej@redhat.com> | 2014-01-09 11:14:56 +0100 |
---|---|---|
committer | Alexander Bokovoy <abokovoy@redhat.com> | 2014-05-05 18:57:29 +0300 |
commit | 1df696f5432a673a24ff5cb273fe068a7d88d6ea (patch) | |
tree | 38b8ab1445b03806a482c9e58949c169373cc630 /ipalib/__init__.py | |
parent | 093c72d60e94d9545e38f2ad90cb24e6f44cbd62 (diff) | |
download | freeipa-1df696f5432a673a24ff5cb273fe068a7d88d6ea.tar.gz freeipa-1df696f5432a673a24ff5cb273fe068a7d88d6ea.tar.xz freeipa-1df696f5432a673a24ff5cb273fe068a7d88d6ea.zip |
ipalib: Add DateTime parameter
Adds a parameter that represents a DateTime format using datetime.datetime
object from python's native datetime library.
In the CLI, accepts one of the following formats:
Accepts LDAP Generalized time without in the following format:
'%Y%m%d%H%M%SZ'
Accepts subset of values defined by ISO 8601:
'%Y-%m-%dT%H:%M:%SZ'
'%Y-%m-%dT%H:%MZ'
'%Y-%m-%dZ'
Also accepts above formats using ' ' (space) as a separator instead of 'T'.
As a simplification, it does not deal with timezone info and ISO 8601
values with timezone info (+-hhmm) are rejected. Values are expected
to be in the UTC timezone.
Values are saved to LDAP as LDAP Generalized time values in the format
'%Y%m%d%H%SZ' (no time fractions and UTC timezone is assumed). To avoid
confusion, in addition to subset of ISO 8601 values, the LDAP generalized
time in the format '%Y%m%d%H%M%SZ' is also accepted as an input (as this is the
format user will see on the output).
Part of: https://fedorahosted.org/freeipa/ticket/3306
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipalib/__init__.py')
-rw-r--r-- | ipalib/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipalib/__init__.py b/ipalib/__init__.py index 553c07197..2a87103b8 100644 --- a/ipalib/__init__.py +++ b/ipalib/__init__.py @@ -886,7 +886,7 @@ from frontend import Command, LocalOrRemote, Updater, Advice from frontend import Object, Method from crud import Create, Retrieve, Update, Delete, Search from parameters import DefaultFrom, Bool, Flag, Int, Decimal, Bytes, Str, IA5Str, Password, DNParam, DeprecatedParam -from parameters import BytesEnum, StrEnum, IntEnum, AccessTime, File +from parameters import BytesEnum, StrEnum, IntEnum, AccessTime, File, DateTime from errors import SkipPluginModule from text import _, ngettext, GettextFactory, NGettextFactory |