I am trying to use AstroPy to convert coordinates for a satellite from ECI to Latitude, Longitude, and Altitude at a given time. However, I cannot get the time part to work with AstroPy obstime. I'm not sure if it's a syntax error for the UTC time or something else.
'New Method #1: ECI --> Lat, Lon, Alt'
from astropy import coordinates as coord
from astropy import units as u
from astropy import time
from astropy.time import Time
xyz = (orbitPineapple.r.x, orbitPineapple.r.y, orbitPineapple.r.z) #position of satellite in GCRS or J2000 ECI
now = time.Time('2017-09-28 16:53:40') #Time in UTC for xyz
cartrep = coord.CartesianRepresentation(*xyz, unit=u.m) #adding units of [m] to xyz
gcrs = coord.GCRS(cartrep, obstime=now)
itrs = gcrs.transform_to(coord.ITRS, obstime=now)
loc = coord.EarthLocation(*itrs.cartesian.xyz)
print(orbitPineapple.r)
print('')
print(loc.lat, loc.lon, loc.height)
My inputs: (Position(x=-2686197.0596728502, y=-6402017.6107924329, z=10956.564679617248))