FusionDirectory
|
LdapGeneralizedTime allows you to convert from and to LDAP GeneralizedTime format PHP DateTime objects. More...
Static Public Member Functions | |
static | fromString ($string, $useException=TRUE) |
Convert from LDAP GeneralizedTime formatted string to DateTime object. More... | |
static | toString (DateTime $date, $setToUTC=TRUE) |
Convert from DateTime object to LDAP GeneralizedTime formatted string. More... | |
LdapGeneralizedTime allows you to convert from and to LDAP GeneralizedTime format PHP DateTime objects.
This class provides function to convert from LDAP GeneralizedTime to DateTime and the other way. Please note that leap seconds will be lost as PHP has no support for it (see https://bugs.php.net/bug.php?id=70335). 01:60 will become 02:00. Also, this class does not support fraction of hours or fraction of minutes (fraction of seconds are supported).
Definition at line 42 of file class_ldapGeneralizedTime.inc.
|
static |
Convert from LDAP GeneralizedTime formatted string to DateTime object.
string | $string | GeneralizedTime formatted string to convert |
boolean | $useException | Whether or not to throw a LdapGeneralizedTimeBadFormatException on failure. Defaults to TRUE. |
Definition at line 50 of file class_ldapGeneralizedTime.inc.
Referenced by DateAttribute\__construct().
|
static |
Convert from DateTime object to LDAP GeneralizedTime formatted string.
DateTime | $date | DateTime object to convert |
boolean | $setToUTC | Whether or not to set the date timezone to UTC. Defaults to TRUE. |
Definition at line 114 of file class_ldapGeneralizedTime.inc.