Make last_modified timestamps returned by get_container_objects consistent with those returned by get_object

Before this commit, get_object returned timestamps in the local timezone with second precision but get_container_objects returned timestamps in UTC with microsecond precision. Now both return timestamps in the local timezone with second precision.
Change the locale back to orig_locale even when an exception occurs