Implemented more attribute classes
This commit is contained in:
18
app/Classes/LDAP/Attribute/Internal/Timestamp.php
Normal file
18
app/Classes/LDAP/Attribute/Internal/Timestamp.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\LDAP\Attribute\Internal;
|
||||
|
||||
use Carbon\Carbon;
|
||||
|
||||
use App\Classes\LDAP\Attribute\Internal;
|
||||
|
||||
/**
|
||||
* Represents an attribute whose values are timestamps
|
||||
*/
|
||||
final class Timestamp extends Internal
|
||||
{
|
||||
public function __toString(): string
|
||||
{
|
||||
return Carbon::createFromTimestamp(strtotime($this->values[0]))->format(config('ldap.datetime_format','Y-m-d H:i:s'));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user