ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
VB: Converting Unix Times to get VRT. (Sdk)
VB: Converting Unix Times to get VRT. // SdkrobbieJun 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 baronJun 23, 2002, 5:49pm
xelagJun 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 |