Converted local_time coffescript to javascript