// Pacific returns the pacific timezone.
558690
func (d date) Pacific() (*time.Location, error) {
	// Try POSIX
	pst, err := time.LoadLocation("America/Los_Angeles")
	if err != nil {
		// Try Windows
		pst, err = time.LoadLocation("PST")
		if err != nil {
			return nil, err
		}
	}
	return pst, nil
}
7680
func (d *DNS) Zones() (dnsprovider.Zones, bool) {
	return &zones{
		client: d.client,
	}, true
}
105140
func (t Time) UnixTime() (sec, nsec int64) {
	sec = int64(t - g1582ns100)
	nsec = (sec % 10000000) * 100
	sec /= 10000000
	return sec, nsec
}
1207055
func (pt *ParseTime) US(value string) (time.Time, error) {
	t, _, err := parseUS(value, pt.location)
	return t, err
}
93148
func (f *TimeFuncs) Unix(in interface{}) (gotime.Time, error) {
	sec, nsec, err := parseNum(in)
	if err != nil {
		return gotime.Time{}, err
	}
	return gotime.Unix(sec, nsec), nil
}
581947
func (s *DBInstance) SetTimezone(v string) *DBInstance {
	s.Timezone = &v
	return s
}
1107465
func Dst(diffs []diffmatchpatch.Diff) string {
	var text bytes.Buffer
	for _, d := range diffs {
		if d.Type != diffmatchpatch.DiffDelete {
			text.WriteString(d.Text)
		}
	}
	return text.String()
}
300593
func (s Session) AddTimeZones(zones ...TimeZone) Session {
	v := make([]byte, 0, 512)
	for i, zone := range zones {
		v = zone.append(v)
		if i != len(zones)-1 {
			v = appendSpace(v)
		}
	}
	return s.append(TypeTimeZones, v)
}
852600
func UTC(t *time.Time) {
	if t == nil {
		return
	}

	if t.IsZero() {
		// to fix issue with timezones for tests
		*t = time.Time{}
		return
	}
	*t = t.UTC()
}
471597
func (q *QueryStringQuery) TimeZone(timeZone string) *QueryStringQuery {
	q.timeZone = timeZone
	return q
}
1059279
func (s *Server) Tick(t int64) {
	pkt := &packet.TimeUpdate{
		Time:     s.gameTime,
		WorldAge: t,
	}
	s.BroadcastPacket(pkt)
}
135462
func constructTimeZone(name string, offset int) (*time.Location, error) {
	if name != "" {
		return timeutil.LoadLocation(name)
	}

	return time.FixedZone("", offset), nil
}
725088
func (i Address) Longitude(v reflect.Value) (interface{}, error) {
	kind := v.Kind()
	val := i.longitude()
	if kind == reflect.Float32 {
		return val, nil
	}
	return float64(val), nil
}
1021641
func (c *Client) TimeZones() ([]*models.TimeZone, error) {
	var err error
	var result []*models.TimeZone

	data, err := httpGet(geonamesURL + timeZonesURL)
	if err != nil {
		return nil, err
	}

	parse(data, 1, func(raw [][]byte) bool {
		if len(raw) != 5 {
			return true
		}

		gmtOffset, _ := strconv.ParseFloat(string(raw[2]), 64)
		dstOffset, _ := strconv.ParseFloat(string(raw[3]), 64)
		rawOffset, _ := strconv.ParseFloat(string(raw[4]), 64)

		result = append(result, &models.TimeZone{
			CountryIso2Code: string(raw[0]),
			TimeZoneID:      string(raw[1]),
			GmtOffset:       time.Duration(gmtOffset) * time.Hour,
			DstOffset:       time.Duration(dstOffset) * time.Hour,
			RawOffset:       time.Duration(rawOffset) * time.Hour,
		})

		return true
	})

	return result, nil
}
309854
func (d date) Eastern() (*time.Location, error) {
	// Try POSIX
	est, err := time.LoadLocation("America/New_York")
	if err != nil {
		// Try Windows
		est, err = time.LoadLocation("EST")
		if err != nil {
			return nil, err
		}
	}
	return est, nil
}
465552
func (s *ZonesService) CheckZoneDistribution(accountID string, zoneName string) (*zoneDistributionResponse, error) {
	path := versioned(fmt.Sprintf("/%v/zones/%v/distribution", accountID, zoneName))
	zoneDistributionResponse := &zoneDistributionResponse{}

	resp, err := s.client.get(path, zoneDistributionResponse)
	if err != nil {
		return nil, err
	}

	zoneDistributionResponse.HttpResponse = resp
	return zoneDistributionResponse, nil
}
756155
func ISO8601(t time.Time) string {
	var tz string
	if zone, offset := t.Zone(); zone == "UTC" {
		tz = "Z"
	} else {
		tz = fmt.Sprintf("%03d00", offset/3600)
	}
	return fmt.Sprintf("%04d-%02d-%02dT%02d:%02d:%02d%s",
		t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second(), tz)
}