an function for inserting current time