corrected comparing of time

Signed-off-by: aLekSer <gdocse@gmail.com>