Problem with date_timezone_set()
I ran into the very same 2 errors but in the context of of sub-theme preprocess function when using the format_date() function as follows.

$vars['timestamp'] = format_date($dc_file_items[0]['timestamp'], 'custom', 'd M, Y');


After searching in many directions (including installing the Date module - not required), I came to realize that $dc_file_items[0]['timestamp'] was returning a string and not an integer. Adding intval() around it made the errors disappear. In the end, the code above should look like this.

$vars['timestamp'] = format_date(intval($dc_file_items[0]['timestamp']), 'custom', 'd M, Y');


Hope this helps.