home *** CD-ROM | disk | FTP | other *** search
- Unit FindTime; { FindTime.pas
- ------------- }
- {$N+}
- {$E+}
-
- Interface {
- --------- }
-
- Uses DOS,CRT,SysDD;
-
- Procedure Find_Local_Time;
-
- Implementation {
- -------------- }
-
- {Compute Local Time at Other Station Location}
-
-
- Procedure Find_Local_Time;
-
- Var
- ComputerHour,
- ComputerMinute,
- ComputerSecond,
- ComputerSec100 : Word;
-
-
- Begin {Find_Local_Time}
-
- {Get Your Local Time}
-
- GetTime(ComputerHour,ComputerMinute,ComputerSecond,ComputerSec100);
-
- YourHour := ComputerHour; {Convert Word To Integer for computations}
- YourMinute := ComputerMinute;
- YourSecond := ComputerSecond;
- YourSec100 := ComputerSec100;
-
- {Compute UTC Time}
-
- UTCHour := YourHour + Your_Time_Corr;
-
- If UTCHour >= 24 Then
- UTCHour := UTCHour - 24;
- If UTCHour < 24 Then
- IF UTCHour < 0 Then
- UTCHour := UTCHour + 24;
-
- { With UTC time, compute time at other station location}
-
- OtherHour := UTCHour + Other_Stn_Time_Corr;
-
- If OtherHour >= 24 Then
- OtherHour := OtherHour - 24;
- If OtherHour < 24 Then
- IF OtherHour < 0 Then
- OtherHour := OtherHour + 24;
-
- End; {of Procedure Find_Local_Time}
-
- End. {of Unit FindTime}