aboutsummaryrefslogtreecommitdiff
path: root/sys/etc/gmtcnv.x
blob: 7713c9c06116441ca53121fafd7050ebb89b907e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

# GMTCNV.X -- GMT (Greenwich mean time) to LST (local standard time, or clock
# time) conversions.
#
#          gmt = lsttogmt (lst)                 # lst/gmt are in seconds
#          lst = gmttolst (gmt)                 # lst/gmt are in seconds



# GMTTOLST -- Convert a long integer value in GMT seconds to LST seconds.

long procedure gmttolst (gmt)

long	gmt			# GMT in seconds
int	gmtco

begin
	call zgmtco (gmtco)
	return (gmt - gmtco)
end



# LSTTOGMT -- Convert a long integer value in LST seconds to GMT seconds.

long procedure lsttogmt (lst)

long	lst			# LST in seconds
int	gmtco

begin
	call zgmtco (gmtco)
	return (lst + gmtco)
end