@@ -92,16 +92,16 @@ |
||
92 | 92 | { |
93 | 93 | $dt = $this->_dt; |
94 | 94 | switch ($this->_type) { |
95 | - case Element::TYPE_UTC_TIME: |
|
96 | - return new UTCTime($dt); |
|
97 | - case Element::TYPE_GENERALIZED_TIME: |
|
98 | - // GeneralizedTime must not contain fractional seconds |
|
99 | - // (rfc5280 4.1.2.5.2) |
|
100 | - if (0 !== intval($dt->format('u'))) { |
|
101 | - // remove fractional seconds (round down) |
|
102 | - $dt = self::_roundDownFractionalSeconds($dt); |
|
103 | - } |
|
104 | - return new GeneralizedTime($dt); |
|
95 | + case Element::TYPE_UTC_TIME: |
|
96 | + return new UTCTime($dt); |
|
97 | + case Element::TYPE_GENERALIZED_TIME: |
|
98 | + // GeneralizedTime must not contain fractional seconds |
|
99 | + // (rfc5280 4.1.2.5.2) |
|
100 | + if (0 !== intval($dt->format('u'))) { |
|
101 | + // remove fractional seconds (round down) |
|
102 | + $dt = self::_roundDownFractionalSeconds($dt); |
|
103 | + } |
|
104 | + return new GeneralizedTime($dt); |
|
105 | 105 | } |
106 | 106 | throw new \UnexpectedValueException( |
107 | 107 | 'Time type ' . Element::tagToName($this->_type) . ' not supported.'); |