Skip to content

Commit

Permalink
Fix datetime-test
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Jul 31, 2024
1 parent ec4b20a commit 41a89ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/XML/wsu/AbstractAttributedDateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public static function fromXML(DOMElement $xml): static

// Time values MUST be expressed in the UTC timezone using the 'Z' timezone identifier
// Strip sub-seconds
$xml->textContent = preg_replace('/([.][0-9]+Z)$/', 'Z', $xml->textContent, 1);
Assert::validDateTimeZulu($xml->textContent, ProtocolViolationException::class);
$xml->textContent = preg_replace('/([.][0-9]+)/', '', $xml->textContent, 1);
Assert::validDateTime($xml->textContent, ProtocolViolationException::class);

$Id = null;
if ($xml->hasAttributeNS(static::NS, 'Id')) {
Expand Down

0 comments on commit 41a89ac

Please sign in to comment.