Closed lizardon closed 11 years ago
In NTPTimeObject in the function createNTPRequest():ByteArray
var tmpOriginDate:Date = new Date(1900,0,1,0,0,0,0);
should be changed to:
var tmpOriginDate:Date = new Date(); tmpOriginDate.setUTCFullYear(1900, 0, 1); tmpOriginDate.setUTCHours(0,0,0,0);
this is because the Date constructor used here assumes the values are given in local time and not UTC time as required.
In the latest commit I just implemented this change. Again; Thank you lizardon! Great point on the UTC vs local time oversight.
In NTPTimeObject in the function createNTPRequest():ByteArray
should be changed to:
this is because the Date constructor used here assumes the values are given in local time and not UTC time as required.