FS#3946 time zone for agent

added new function to format time according to timezone passed
in