Skip to content

Commit

Permalink
sql: remove write to time.Local and use env var instead (cockroachdb#…
Browse files Browse the repository at this point in the history
…40336)

Release note: none
  • Loading branch information
cucaroach committed May 21, 2021
1 parent d80f6e4 commit 9bca943
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,10 @@ LDFLAGS ?=
CGO_CFLAGS = $(filter-out -g%,$(CFLAGS))
CGO_CXXFLAGS = $(CXXFLAGS)
CGO_LDFLAGS = $(filter-out -static,$(LDFLAGS))
# certain time based fail if UTC isn't the default timezone
TZ=""

export CFLAGS CXXFLAGS LDFLAGS CGO_CFLAGS CGO_CXXFLAGS CGO_LDFLAGS
export CFLAGS CXXFLAGS LDFLAGS CGO_CFLAGS CGO_CXXFLAGS CGO_LDFLAGS TZ

# We intentionally use LINKFLAGS instead of the more traditional LDFLAGS
# because LDFLAGS has built-in semantics that don't make sense with the Go
Expand Down
1 change: 1 addition & 0 deletions build/variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ define VALID_VARS
TESTTIMEOUT
TSC
TYPE
TZ
UI_CCL_DLLS
UI_CCL_MANIFESTS
UI_JS_CCL
Expand Down
3 changes: 0 additions & 3 deletions pkg/sql/logictest/logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -3163,9 +3163,6 @@ func RunLogicTestWithDefaultConfig(
globs = []string{*logictestdata}
}

// Set time.Local to time.UTC to circumvent pq's timetz parsing flaw.
time.Local = time.UTC

// A new cluster is set up for each separate file in the test.
var paths []string
for _, g := range globs {
Expand Down

0 comments on commit 9bca943

Please sign in to comment.