Issue 4832: fix bug compare date