// TimeZone returns a random timezone
191184
func (d DateTime) TimeZone(v reflect.Value) (interface{}, error) {
	return d.timezone(), nil
}
1098223
func FormatDateTime(key string, val time.Time) (string, string) {
	return key, val.UTC().Format("20060102T150405Z")
}
1282359
func (s *FileTime) Time() UTCTime {
	return UTCTime(time.Unix(int64(s.Convert()), 0))
}
688516
func (az *Cloud) makeZone(zoneID int) string {
	return fmt.Sprintf("%s-%d", strings.ToLower(az.Location), zoneID)
}
362139
func Zone() (string, error) {
	zone, err := getTrimmed("instance/zone")
	// zone is of the form "projects/<projNum>/zones/<zoneName>".
	if err != nil {
		return "", err
	}
	return zone[strings.LastIndex(zone, "/")+1:], nil
}
953280
func (s *DescribeGatewayInformationOutput) SetGatewayTimezone(v string) *DescribeGatewayInformationOutput {
	s.GatewayTimezone = &v
	return s
}
191676
func (r *RandomGenerator) DateTime() time.Time {
	// Use a constant max value to make sure the same pseudo random
	// values get generated for a given API.
	max := time.Date(2016, time.July, 11, 23, 0, 0, 0, time.UTC).Unix()
	unix := r.rand.Int63n(max)
	return time.Unix(unix, 0).UTC()
}
233747
func (s *UpdateMaintenanceWindowOutput) SetScheduleTimezone(v string) *UpdateMaintenanceWindowOutput {
	s.ScheduleTimezone = &v
	return s
}
1224142
func FormatTime(name string, t time.Time) string {
	t = t.UTC()

	switch name {
	case RFC822TimeFormatName:
		return t.Format(RFC822TimeFormat)
	case ISO8601TimeFormatName:
		return t.Format(ISO8601TimeFormat)
	case UnixTimeFormatName:
		return strconv.FormatInt(t.Unix(), 10)
	default:
		panic("unknown timestamp format name, " + name)
	}
}
637834
func (s *DBInstanceAutomatedBackup) SetTimezone(v string) *DBInstanceAutomatedBackup {
	s.Timezone = &v
	return s
}
47326
func (s *EndpointDemographic) SetTimezone(v string) *EndpointDemographic {
	s.Timezone = &v
	return s
}
553042
func ParseTime(str string, loc *time.Location) (t time.Time, err error) {
	str = strings.TrimSpace(str)
	format := TimeFormat[:19]
	switch len(str) {
	case 10:
		if str == "0000-00-00" {
			return
		}
		format = format[:10]
	case 19:
		if str == "0000-00-00 00:00:00" {
			return
		}
	}
	// Don't expect 0000-00-00 00:00:00.0+
	t, err = time.ParseInLocation(format, str, loc)
	return
}
550954
func (m *Machine) AvailabilityZone() (string, error) {
	var results params.StringResults
	args := params.Entities{
		Entities: []params.Entity{{Tag: m.tag.String()}},
	}
	err := m.st.facade.FacadeCall("AvailabilityZone", args, &results)
	if err != nil {
		return "", err
	}
	if len(results.Results) != 1 {
		return "", fmt.Errorf("expected 1 result, got %d", len(results.Results))
	}
	result := results.Results[0]
	if result.Error != nil {
		return "", result.Error
	}
	return result.Result, nil
}
951183
func (client *Client) AddZone(args *AddZoneArgs) (response *AddZoneResponse, err error) {
	response = &AddZoneResponse{}

	err = client.Invoke("AddZone", args, &response)

	return response, err
}
1042701
func (s *DescribeSnapshotScheduleOutput) SetTimezone(v string) *DescribeSnapshotScheduleOutput {
	s.Timezone = &v
	return s
}
243418
func (c *Client) CreateZone(p *CreateZoneParameter) (*Zone, error) {
	obj, err := c.Request("createZone", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Zone), err
}
1276515
func (s *ZoneService) UpdateZone(p *UpdateZoneParams) (*UpdateZoneResponse, error) {
	resp, err := s.cs.newRequest("updateZone", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r UpdateZoneResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}