obspy.core.utcdatetime.UTCDateTime.__ne__

UTCDateTime.__ne__(other)[source]

Rich comparison operator ‘!=’.

Comparing two UTCDateTime object will always compare timestamps rounded to a precision of 6 digits by default.

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

But the actual timestamp differ

>>> t1.timestamp != t2.timestamp
True

Resetting the precision changes the behavior of the operator

>>> t1.precision = 11
>>> t1 != t2
True