phpldapadmin/app/Classes/LDAP/Attribute/Internal/Timestamp.php

18 lines
387 B
PHP
Raw Normal View History

2023-03-02 07:21:53 +00:00
<?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'));
}
}