code: def ConvertDateTimeToOffset(date_time_value):
    
    date_time_obj = datetime(int(date_time_value['date']['year']),
                             int(date_time_value['date']['month']),
                             int(date_time_value['date']['day']),
                             int(date_time_value['hour']),
                             int(date_time_value['minute']),
                             int(date_time_value['second']))
    date_time_str = pytz.timezone(
        date_time_value['timeZoneId']).localize(date_time_obj).isoformat()
  
    if date_time_str[-5:] == '00:00':
      return date_time_str[:-6] + 'Z'
    else:
      return date_time_str
docs: Converts the PQL formatted response for a dateTime object.
  
    Output conforms to ISO 8061 format, e.g. 'YYYY-MM-DDTHH:MM:SSz.'
  
    Args:
      date_time_value: dict The date time value from the PQL response.
  
    Returns:
      str: A string representation of the date time value uniform to
          ReportService.