Thread

VB: Converting Unix Times to get VRT. (Sdk)

VB: Converting Unix Times to get VRT. // Sdk

1  |  

robbie

Jun 23, 2002, 5:07pm
Does anyone still have the function posted on here a long time ago to conver
the long returned by the SDK into VRT? I really need it and I can seem to
find the post anywhere.

-Robbie

baron

Jun 23, 2002, 5:49pm
news://news.activeworlds.com/3c9b93fe at server1.Activeworlds.com


[View Quote]

xelag

Jun 24, 2002, 5:42pm
[View Quote] >Does anyone still have the function posted on here a long time ago to conver
>the long returned by the SDK into VRT? I really need it and I can seem to
>find the post anywhere.
>
>-Robbie
>
In my delphi bot I use this:

function UnixToVRTime(UnixTime: Integer): TDateTime;
begin
{Unix time is GMT in seconds, VRT is 2 hrs earlier}
Result := UnixToDelphiTime(UnixTime - 7200);
end;

function UnixToDelphiTime(UnixTime: Integer): TDateTime;
begin
{UnixTime is GMT in seconds. 86400 secs in day,
25569 days from Unix standard 1 jan 1970 to Delphi2 30 dec 1899 }
Result := (UnixTime / 86400) + 25569;
end;

Sorry, I dont know how to convert it to DOS units or so...

Alex

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn