Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,8 @@ def get_moon_info(date_time: str) -> dict:
|
|
47 |
"""
|
48 |
try:
|
49 |
# Parse input date and time
|
50 |
-
user_time = datetime.datetime
|
|
|
51 |
user_time = pytz.utc.localize(user_time)
|
52 |
|
53 |
# Load astronomical data
|
@@ -59,8 +60,7 @@ def get_moon_info(date_time: str) -> dict:
|
|
59 |
|
60 |
# Get the geocentric position of the Moon
|
61 |
earth = planets['earth']
|
62 |
-
moon
|
63 |
-
= planets['moon']
|
64 |
astrometric = earth.at(t).observe(moon)
|
65 |
ra, dec, distance = astrometric.radec()
|
66 |
|
|
|
47 |
"""
|
48 |
try:
|
49 |
# Parse input date and time
|
50 |
+
user_time = datetime.datetime
|
51 |
+
.strptime(date_time, "%Y-%m-%dT%H:%M:%S")
|
52 |
user_time = pytz.utc.localize(user_time)
|
53 |
|
54 |
# Load astronomical data
|
|
|
60 |
|
61 |
# Get the geocentric position of the Moon
|
62 |
earth = planets['earth']
|
63 |
+
moon = planets['moon']
|
|
|
64 |
astrometric = earth.at(t).observe(moon)
|
65 |
ra, dec, distance = astrometric.radec()
|
66 |
|