obspy.core.utcdatetime.UTCDateTime.__ne__

UTCDateTime.__ne__(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.000000012)
>>> t2 = UTCDateTime(123.000000099)
>>> t1 == t2
True

Defining a higher precision changes the behavior of the operator

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