obspy.core.utcdatetime.UTCDateTime.__gt__

UTCDateTime.__gt__(other)[source]

Rich comparison operator ‘>’.

Comparing two UTCDateTime objects will compare the nanoseconds integers rounded to a number of significant digits determined by the precision attribute.

>>> t1 = UTCDateTime(123.000000099)
>>> t2 = UTCDateTime(123.000000012)
>>> t1 > t2
False

Defining a higher precision changes the behavior of the operator

>>> t1 = UTCDateTime(123.000000099, precision=9)
>>> t2 = UTCDateTime(123.000000012, precision=9)
>>> t1 > t2
True