Refactoring to set timestamp on server