GTimeZoneBias (Linux)

Giganews Newsgroups
Subject: GTimeZoneBias (Linux)
Posted by:  Dean (dean@nospam-weany.com)
Date: Wed, 1 Dec 2004

I'm trying to convert from time_t to TDateTime. I got this code from the
net, but it seems to be 11 months out.

const
  SecondPerDate = 24 * 60 * 60;

function time_tToDateTime(Time: time_t): TDateTime;
begin
Result := Time / SecondPerDate + 25569 - (GTimeZoneBias/1440);
end;

Can anyone give me some working code for this? I've searched the net, but
there's precious little on it.

Thanks,

Dean

Replies