Hello,
I am new about your library, and for my test when I try to retrieve the TimeSpan from NtpResponse I had an "System.OverflowException" with this stack trace:
at Rebex.Net.NtpTimestampDifference.Add(NtpTimestampDifference value)
at Rebex.Net.NtpTimestampDifference.op_Addition(NtpTimestampDifference a, NtpTimestampDifference b)
at Rebex.Net.NtpResponse.get_TimeOffset()
This is my sample code:
`
{
string serverName = Console.ReadLine();
Ntp ntp = new Ntp(serverName)
{
VersionNumber = NTP_PROTOCOL_VERSION,
Timeout = NTP_REQUEST_TIMEOUT_MS
};
NtpResponse response = ntp.GetTime();
TimeSpan ntpServerDelta = response.TimeOffset.ToTimeSpan();
DateTime currentTime = DateTime.UtcNow + ntpServerDelta;
Console.WriteLine("The server current time is {0} ", currentTime);
Console.ReadLine();
}`
This occurred when I have a big difference between the server and my local machine.
How can I solve this?
Thanks in advance.