Added code to deal with time zone issues