12345678910111213141516171819 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- #
- import config
- import geo
- import inspect
- import time
-
-
- def now():
- return time.mktime(time.localtime())
-
-
- def sunrise_time(time_offs_min=30):
- return time.mktime(geo.sun.sunrise(config.GEO_POSITION)) + time_offs_min * 60
-
-
- def sunset_time(time_offs_min=-30):
- return time.mktime(geo.sun.sunset(config.GEO_POSITION)) + time_offs_min * 60
|