implement time formatting