Improve time module, add locale class