made some serious refactoring for server side code

fixed date format which is sent to the server side
for exchange rates