clock refactor and server time