Updated comparison to mysql time functions