Commit 25b39d69c86b364d30de5f8b0ab38be09a8042fc
1 parent
8c6dd04995
Exists in
master
NewServer renamed to NewODBCServer to be more precise
Showing
2 changed files
with
5 additions
and
1 deletions
Show diff stats
http.go
... | ... | @@ -166,3 +166,7 @@ func AddHeader(r *http.Request, key, val string) { |
166 | 166 | func GetHeader(r *http.Request, key string) string { |
167 | 167 | return r.Header.Get(key) |
168 | 168 | } |
169 | + | |
170 | +func GetClientAgentUTCOffset(req *http.Request) int64 { | |
171 | + return StringToInt64(GetHeader(req, "X-Timezone-Offset")) | |
172 | +} | ... | ... |
server.go
... | ... | @@ -17,7 +17,7 @@ type Server struct { |
17 | 17 | UTCOffset int64 |
18 | 18 | } |
19 | 19 | |
20 | -func NewServer(dsn, port, logDir string, utcOffset int64) (s *Server, err error) { | |
20 | +func NewODBCServer(dsn, port, logDir string, utcOffset int64) (s *Server, err error) { | |
21 | 21 | s = new(Server) |
22 | 22 | |
23 | 23 | s.Port = port | ... | ... |