Closed tianhongw closed 4 years ago
Hey @Trytwice. Thanks for raising the issue. I've tried your branch on my system and it looks as if the same unexpected result is happening.
The json marshal is converting that time field into an RFC3339Nano formatted string, which also introduces issues with time zones changing from the original. (on my system, it was comparing GMT 0 with UTC 0, which are actually the same thing)
I think the best way to handle this is to diff to unix nano time. That way, no precision is lost and the comparison is standardised. I've left a comment with the suggested change.
output:
Marshal and umarshal time type will lose accuracy. Compare time in millisecond may be enough.