FusionDirectory
 All Data Structures Files Functions Variables
Static Public Member Functions
LdapGeneralizedTime Class Reference

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 ($date, $setToUTC=TRUE)
 Convert from DateTime object to LDAP GeneralizedTime formatted string. More...
 

Detailed Description

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.

Member Function Documentation

static fromString (   $string,
  $useException = TRUE 
)
static

Convert from LDAP GeneralizedTime formatted string to DateTime object.

Parameters
stringGeneralizedTime formatted string to convert
useExceptionWhether or not to throw a LdapGeneralizedTimeBadFormatException on failure. Defaults to TRUE.

Definition at line 50 of file class_ldapGeneralizedTime.inc.

Referenced by get_locks().

static toString (   $date,
  $setToUTC = TRUE 
)
static

Convert from DateTime object to LDAP GeneralizedTime formatted string.

Parameters
dateDateTime object to convert
useExceptionWhether or not to set the date timezone to UTC. Defaults to TRUE.

Definition at line 114 of file class_ldapGeneralizedTime.inc.

Referenced by add_lock().


The documentation for this class was generated from the following file: