added get_formated_time keyword to generate time according to format and offset