Board index » kylix » time_t to TDateTime - anyone know what's wrong with this?

time_t to TDateTime - anyone know what's wrong with this?


2004-12-02 03:48:04 AM
kylix0
Here's what I've tried:-
function time_tToDateTime(Time: time_t): TDateTime;
begin
Result := Time / SecondPerDate + 25569-(GTimeZoneBias/1440);
end;
Which I got somewhere from the net. I can't find any other resources, but
this seems to be 11 months out of whack.
Anyone have any ideas?
Thanks.......
 
 

Re:time_t to TDateTime - anyone know what's wrong with this?

Sorry, I should mention:-
SecondPerDate = 24 * 60 * 60;
Thanks,
Dean
 

Re:time_t to TDateTime - anyone know what's wrong with this?

Dean schrieb:
Quote
Sorry, I should mention:-

SecondPerDate = 24 * 60 * 60;

Thanks,

Dean


groups.google.com/groups&lr=&threadm=3feda7fa%40newsgroups.borland.com&rnum=7
 

{smallsort}

Re:time_t to TDateTime - anyone know what's wrong with this?

Thank you - looks like I don't actually need to use TDateTime at all....
which is even better!
Dean
"theo" < XXXX@XXXXX.COM >wrote in message
Quote
Dean schrieb:
>Sorry, I should mention:-
>
>SecondPerDate = 24 * 60 * 60;
>
>Thanks,
>
>Dean
>
>



groups.google.com/groups&lr=&threadm=3feda7fa%40newsgroups.borland.com&rnum=7