Next / Previous / Contents / Shipman's homepage

11.6. SiderealTime.fromDatetime(): Convert UTC to GST

This static method takes a standard Python datetime instance and returns a new SiderealTime instance representing the corresponding Greenwich Sidereal Time.


The argument is a datetime instance. If dt is an “aware” timestamp instance, with time zone information, the result represents the sidereal time at the equivalent UTC corresponding. If dt is “naive,” with no time zone information, it is assumed to represent UTC.