Changed time formatting method to use locale formatter