Amazon.CognitoSync.SyncManager.Internal.DatasetUtils.TruncateToSeconds C# (CSharp) Method

TruncateToSeconds() public static method

A helper function to truncate a DateTime object to whole seconds.
public static TruncateToSeconds ( System.DateTime dateTime ) : System.DateTime
dateTime System.DateTime The DateTime to be truncated.
return System.DateTime
        public static DateTime TruncateToSeconds(DateTime dateTime)
        {
            return dateTime.AddTicks(-(dateTime.Ticks % TimeSpan.TicksPerSecond));
        }
    }