[DUG] Reading binary data as date/time from registry
Jan Bakuwel
jan.bakuwel at omiha.com
Fri May 14 16:02:19 NZST 2010
Hi,
Phil: the double returned is almost zero but not quite:
5.02935870345123E-300. I don't know which (IEEE?) representation Delphi
is using to store floating point numbers.... but surely it's not zero.
What is interesting though is that even though I assume the correct bit
pattern gets into the double (reading 8 bytes from the registry into a
double can only be done in so many ways), that Delphi is - apparently? -
interpreting it as zero as implicated by a date of 30/12/1899.
John: Thanks for the suggestion to look into FileDate/Times - will
report back what I find out.
Thanks to all for helping out with my Friday Trivia :-)
wish you a good weekend,
Jan
On 14/05/10 12:40, John Bird wrote:
> I am pretty certain that 30/12/1899 is a unique start point for Delphi -
> other systems (Unix and Windows) look to start at 1970 or 1980. I am
> guessing as I haven't dealt with registry dates that you need to do
> something similar to a file datestamp - FileDatetoDateTime and/or
> FileTimeToSystemTime API
>
> I saw some code examples at
>
> http://www.efg2.com/Lab/Library/Delphi/DatesAndTimes/index.html
>
> which appear to back this up (about 1/4 way down the page). Is the date
> value likely to be a windows integer date/timestamp?
>
> John
>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
>
>
More information about the Delphi
mailing list