timeCommands: removed global variables, fixed some incorrect logic in setDate, and changed setTime to use a 24-hour system indexed from zero