add function for converting JS Date objects to time.Time