mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:35:13 +00:00
change strategy for Time class
This commit is contained in:
parent
dbd76f879b
commit
ac7c1d497b
2 changed files with 2 additions and 7 deletions
|
@ -21,7 +21,7 @@ class JcsEddsa2022
|
|||
$options = [
|
||||
'type' => 'DataIntegrityProof',
|
||||
'cryptosuite' => 'eddsa-jcs-2022',
|
||||
'created' => new Time(format: ATOM_TIME),
|
||||
'created' => Time::convert(format: ATOM_TIME),
|
||||
'verificationMethod' => Channel::url($channel) . '#' . $pubkey,
|
||||
'proofPurpose' => 'assertionMethod',
|
||||
];
|
||||
|
|
|
@ -8,12 +8,7 @@ use Exception;
|
|||
|
||||
class Time
|
||||
{
|
||||
protected $from = 'UTC';
|
||||
protected $to = 'UTC';
|
||||
protected $datetime;
|
||||
protected $format;
|
||||
|
||||
public function __construct($from = 'UTC', $to = 'UTC', $datetime = 'now', $format = "Y-m-d H:i:s")
|
||||
public static function convert($from = 'UTC', $to = 'UTC', $datetime = 'now', $format = "Y-m-d H:i:s")
|
||||
{
|
||||
|
||||
// Defaults to UTC if nothing is set, but throws an exception if set to empty string.
|
||||
|
|
Loading…
Reference in a new issue