moved GetHour to misc.js