mirror of
https://github.com/MichaelGrafnetter/DSInternals
synced 2025-02-15 18:36:49 +00:00
18 lines
391 B
C#
18 lines
391 B
C#
|
|
using System;
|
|
|
|
namespace DSInternals.DataStore
|
|
{
|
|
public static class DateTimeExtensions
|
|
{
|
|
public static long ToGeneralizedTime(this DateTime time)
|
|
{
|
|
return time.ToFileTime() / ADConstants.GeneralizedTimeCoefficient;
|
|
}
|
|
public static long ToTimeStamp(this DateTime time)
|
|
{
|
|
return time.ToFileTime();
|
|
}
|
|
}
|
|
}
|