basetime update code