mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-18 16:17:10 +01:00
* wip * . * . * nuget * . * . * WithMappingModel * tests * json * codefactor * sign * . * interface * sln * comments
18 lines
503 B
C#
18 lines
503 B
C#
using System;
|
|
using System.Globalization;
|
|
|
|
namespace WireMock.Net.OpenApiParser.Utils
|
|
{
|
|
internal static class DateTimeUtils
|
|
{
|
|
public static string ToRfc3339DateTime(DateTime dateTime)
|
|
{
|
|
return dateTime.ToString("yyyy-MM-dd'T'HH:mm:ss.fffzzz", DateTimeFormatInfo.InvariantInfo);
|
|
}
|
|
|
|
public static string ToRfc3339Date(DateTime dateTime)
|
|
{
|
|
return dateTime.ToString("yyyy-MM-dd", DateTimeFormatInfo.InvariantInfo);
|
|
}
|
|
}
|
|
} |