MCPcopy Index your code
hub / github.com/coder/coder / asRequestOption

Method asRequestOption

codersdk/deployment.go:5241–5247  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5239}
5240
5241func (d DAURequest) asRequestOption() RequestOption {
5242 return func(r *http.Request) {
5243 q := r.URL.Query()
5244 q.Set("tz_offset", strconv.Itoa(d.TZHourOffset))
5245 r.URL.RawQuery = q.Encode()
5246 }
5247}
5248
5249// TimezoneOffsetHourWithTime is implemented to match the javascript 'getTimezoneOffset()' function.
5250// This is the amount of time between this date evaluated in UTC and evaluated in the 'loc'

Callers 1

DeploymentDAUsMethod · 0.45

Calls 2

EncodeMethod · 0.80
SetMethod · 0.65

Tested by

no test coverage detected