function to insert current time