How to fix this ?
Here is a list of the constructors available to create a DateTime structure:
I think it’s not relate this error.
Okay, you think the error about the parameter in the constructor isn’t related to the constructor of the structure? ![]()
Did you open the page that I linked?
I use DateTime.FromOADate. But It’s can’t covert.
I see… I partially misread that there; that AODate wasn’t posted.
So, if you Debug.Log the value of ‘d’ what do you get?
It’s double value. I get this from TimeCheatingDetector.GetOnlineTime(“pool.ntp.org”);/
d = 3702883471158.15;
Dunno that is odd, then. Where is this OADate method? Does it throw exceptions at all ?
I read from this link. Below here.
http://stackoverflow.com/questions/13919641/how-to-convert-a-double-value-to-a-datetime-in-c
lol Okay, I didn’t know about that function.. Cool ![]()
Now, you didn’t read this completely, I don’t think?
Pasting important remarks:
Remarks
An OLE Automation date is implemented as a floating-point number whose integral component is the number of days before or after 30 December 1899, and whose fractional component represents the time on that day divided by 24. For example, midnight, 31 December 1899 is represented by 1.0; 6 A.M., 1 January 1900 is represented by 2.25; midnight, 29 December 1899 is represented by -1.0; and 6 A.M., 29 December 1899 is represented by -1.25.
The base OLE Automation date is midnight, 30 December 1899. The minimum OLE Automation date is midnight, 1 January 0100. The maximum OLE Automation date is the same as MaxValue, the last moment of 31 December 9999.
The ToOADate method throws an OverflowException if the current instance represents a date that is later than MinValue and earlier than midnight on January1, 0100. However, if the value of the current instance is MinValue, the method returns 0.
There is DateTime.ToOADate and From… so, not sure if you used 'ToADate" previously or not.
This is from the “FromOADate” remarks:
The d parameter is a double-precision floating-point number that represents a date as the number of days before or after the base date, midnight, 30 December 1899. The sign and integral part of d encode the date as a positive or negative day displacement from 30 December 1899, and the absolute value of the fractional part of d encodes the time of day as a fraction of a day displacement from midnight. d must be a value between negative 657435.0 through positive 2958466.0.
Yours, as you can see, was far outside that range.
Thank you very much! I will to check it. ![]()
no problem
Good luck ![]()

