Pulling out my trusty calculator, it appears that the hex value
accounts for about 86 years, so you would just add it to Jan 1, 1904
to get the correct value (converting seconds to days). OTTOMH,
should be something like:
EncodeDate (1904, 1, 1) + Value / (24 * 60 * 60)
Where "Value" is the 64-bit integer (don't do any swapping), in this
case $A2E3272A. (I didn't write any code to test this, so might be a
bit off somewhere.)
At 03:18 PM 11/13/2012, Neil Beshoori wrote:
Hi
I am using my trusty old Delphi 5 and struggling with the following problem
I am trying to interpret a Truetype/opentype font creation date.
I can read other data from the 'head' table in the font file correctly but
not the timedate issue
The spec has the following description
(http://www.microsoft.com/typography/otspec/head.htm)
Format
LONGDATETIME which is Number of seconds since 12:00 midnight, January 1,
1904. 64-bit integer
I am creating an array of word to read this structure with the following
longDateTime = array[0..3] of Word;
I am aware of the swapped words issues.
One font has date 06/08/1990 and time 14:54:50
The hex dump in the file is 00 00 00 00 A2 E3 27 2A
Can anybody please help/explain how I can get above date/time from this hex
dump?
kind regards
Neil
_______________________________________________
Delphi mailing list
Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list
Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi