Changing serverTime format from yyyy-MM-dd-hh-mm-ss to yyyy-MM-ddThh:mm:ss and refactoring some code