parseSeconds function on date helper