Fix the bug of customize time interval function