Typesetting a range of times or just time in general


I've seen many different ways time is handled. For example 6p.m. 6 p.m. (with a space and periods, which I read is the way it's supposed to be written) Sometimes PM(can be in small caps) If it was 5—6 p.m. there would be a en dash between the range of time. Is there a correct way in typography on how to set the time? How would I write 10 a.m. to 7 p.m.? 10 a.m.—7 p.m.?