converting timestamp string in rails to formatted string