Question: Is there a simple way to state that 

```
a = '2020-01-01 19:30:33.996628' 
b = '2020-01-01 19:30:34' 

```

`a` and `b` are equal. If the time resolution of `a` is changed to second, then `a` could be equal to `b`. How to implement it with code?

Answer: 
if you treat both of them as `datetime` objects, you can use arithmetic operators on them. For example, you can subtract them and check if the result satisfy a condition (like less then one minute different) as you wise
The function `datetime_round_s()` below rounds to the closest second (like usual rounding of numbers):

```python
import datetime

def datetime_round_s(date_time: datetime.datetime) -> datetime.datetime:
    return (date_time + datetime.timedelta(microseconds=5e5)).replace(microsecond=0)

a = datetime.datetime.fromisoformat('2020-01-01 19:30:33.996628')
b = datetime.datetime.fromisoformat('2020-01-01 19:30:34')

print(a)
print(datetime_round_s(a))
print(datetime_round_s(a) == b)

```

otuput:

```none
2020-01-01 19:30:33.996628
2020-01-01 19:30:34
True

```