Epoch January 1, 2000
Posted: Mon Mar 18, 2013 7:21 pm
Does anyone know if the Epoch date/time of 01/01/1970 0:00:00 can be changed in some way for use with the Date() function?
The help for Date() has this example:
The example in the help file is perfect as its short and to the point but unfortunately the restricted nature of Date() by using the Unix Epoch makes the use of a short to the point help Date() type of thing not suitable in this case. So, can the Date() function Epoch date/time be set to something else some way?
Edit: Never mind, I decided to go another route and use the number of days since the 2000 Epoch (which is the number of Julian days since the 2000 Epoch) converted to seconds, then added to UTC hours & minutes converted to seconds then added to the current number of present day seconds less than a minute based upon a call to the GetSystemTime() API. Then I have an IEEE\IANA\IETF compliant timestamp to use for generating Type 1 & 2 DHCPIPv6 DUID's
The help for Date() has this example:
I need the number of seconds since midnight (UTC), January 1, 2000 (modulo 2^32) to whatever the current date is (or may be), just the number of seconds will do.Date(1999, 12, 31, 23, 59, 59) ; will print '946684799' (number of seconds between 01/01/1970 0:00:00 and 12/31/1999 23:59:59)
The example in the help file is perfect as its short and to the point but unfortunately the restricted nature of Date() by using the Unix Epoch makes the use of a short to the point help Date() type of thing not suitable in this case. So, can the Date() function Epoch date/time be set to something else some way?
Edit: Never mind, I decided to go another route and use the number of days since the 2000 Epoch (which is the number of Julian days since the 2000 Epoch) converted to seconds, then added to UTC hours & minutes converted to seconds then added to the current number of present day seconds less than a minute based upon a call to the GetSystemTime() API. Then I have an IEEE\IANA\IETF compliant timestamp to use for generating Type 1 & 2 DHCPIPv6 DUID's