22.12.2021, 13:17
Change latitude, longitude and sending groups as needed:
Code:
latitude = 12
longitude = 23
sunrise, sunset = rscalc(latitude, longitude)
grp.write('1/1/1', {
hour = math.floor(sunrise / 60),
min = sunrise % 60,
sec = 0,
})
grp.write('1/1/2', {
hour = math.floor(sunset / 60),
min = sunset % 60,
sec = 0,
})