From 7c46558b6cc77269bfdeba90792b7fb0fd91401a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Luthi?= Date: Sun, 17 Nov 2024 18:26:46 +0100 Subject: [PATCH] Mark DateTimeExtensions methods as obsolete Fixes #40 --- identity-model/src/IdentityModel/DateTimeExtensions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/identity-model/src/IdentityModel/DateTimeExtensions.cs b/identity-model/src/IdentityModel/DateTimeExtensions.cs index 91b75121..e17b6a58 100644 --- a/identity-model/src/IdentityModel/DateTimeExtensions.cs +++ b/identity-model/src/IdentityModel/DateTimeExtensions.cs @@ -11,6 +11,7 @@ public static class DateTimeExtensions /// /// Converts the given date value to epoch time. /// + [Obsolete("Please use DateTimeOffset.ToUnixTimeSeconds() instead.")] public static long ToEpochTime(this DateTime dateTime) { var date = dateTime.ToUniversalTime(); @@ -22,6 +23,7 @@ public static long ToEpochTime(this DateTime dateTime) /// /// Converts the given epoch time to a with kind. /// + [Obsolete("Please use DateTimeOffset.FromUnixTimeSeconds() instead.")] public static DateTime ToDateTimeFromEpoch(this long date) { var timeInTicks = date * TimeSpan.TicksPerSecond;