20 lines
480 B
C#
20 lines
480 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace Taloyhtio.GeneralSSO.Server.CodeFiles.Common
|
|
{
|
|
public static class DateTimeExtensions
|
|
{
|
|
internal static DateTime AsUtc(this DateTime value)
|
|
{
|
|
if (value.Kind == DateTimeKind.Unspecified)
|
|
{
|
|
return new DateTime(value.Ticks, DateTimeKind.Utc);
|
|
}
|
|
return value.ToUniversalTime();
|
|
}
|
|
}
|
|
}
|