AsnWriter.WriteUtcTime Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WriteUtcTime(DateTimeOffset, Nullable<Asn1Tag>) |
Write the provided value as a UTCTime with a specified tag, accepting the two-digit year as valid in context. |
WriteUtcTime(DateTimeOffset, Int32, Nullable<Asn1Tag>) |
Write the provided value as a UTCTime with a specified tag, provided the year is in the allowed range. |
WriteUtcTime(DateTimeOffset, Nullable<Asn1Tag>)
- Source:
- AsnWriter.UtcTime.cs
- Source:
- AsnWriter.UtcTime.cs
- Source:
- AsnWriter.UtcTime.cs
- Source:
- AsnWriter.UtcTime.cs
- Source:
- AsnWriter.UtcTime.cs
Write the provided value as a UTCTime with a specified tag, accepting the two-digit year as valid in context.
public void WriteUtcTime (DateTimeOffset value, System.Formats.Asn1.Asn1Tag? tag = default);
member this.WriteUtcTime : DateTimeOffset * Nullable<System.Formats.Asn1.Asn1Tag> -> unit
Public Sub WriteUtcTime (value As DateTimeOffset, Optional tag As Nullable(Of Asn1Tag) = Nothing)
Parameters
- value
- DateTimeOffset
The value to write.
Exceptions
Applies to
WriteUtcTime(DateTimeOffset, Int32, Nullable<Asn1Tag>)
- Source:
- AsnWriter.UtcTime.cs
- Source:
- AsnWriter.UtcTime.cs
- Source:
- AsnWriter.UtcTime.cs
- Source:
- AsnWriter.UtcTime.cs
- Source:
- AsnWriter.UtcTime.cs
Write the provided value as a UTCTime with a specified tag, provided the year is in the allowed range.
public void WriteUtcTime (DateTimeOffset value, int twoDigitYearMax, System.Formats.Asn1.Asn1Tag? tag = default);
member this.WriteUtcTime : DateTimeOffset * int * Nullable<System.Formats.Asn1.Asn1Tag> -> unit
Public Sub WriteUtcTime (value As DateTimeOffset, twoDigitYearMax As Integer, Optional tag As Nullable(Of Asn1Tag) = Nothing)
Parameters
- value
- DateTimeOffset
The value to write.
- twoDigitYearMax
- Int32
The maximum valid year for value
, after conversion to UTC.
For the X.509 Time.utcTime range of 1950-2049, pass 2049
.
Exceptions
value
.Year (after conversion to UTC) is not in the range (twoDigitYearMax
- 100, twoDigitYearMax
].