Skip to content

Commit ef9a6dd

Browse files
authored
fix: embed timezone database via time/tzdata (#476)
Fixes #470
1 parent b6966bf commit ef9a6dd

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

integration/integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func TestIntegration(t *testing.T) {
9999
"workspace_preset.parameters.param": `preset param value`,
100100
"workspace_preset.prebuilds.instances": `1`,
101101
"workspace_preset.prebuilds.expiration_policy.ttl": `86400`,
102-
"workspace_preset.prebuilds.scheduling.timezone": `UTC`,
102+
"workspace_preset.prebuilds.scheduling.timezone": `America/New_York`,
103103
"workspace_preset.prebuilds.scheduling.schedule0.cron": `\* 8-18 \* \* 1-5`,
104104
"workspace_preset.prebuilds.scheduling.schedule0.instances": `3`,
105105
"workspace_preset.prebuilds.scheduling.schedule1.cron": `\* 8-14 \* \* 6`,

integration/test-data-source/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ data "coder_workspace_preset" "preset" {
3434
ttl = 86400
3535
}
3636
scheduling {
37-
timezone = "UTC"
37+
timezone = "America/New_York"
3838
schedule {
3939
cron = "* 8-18 * * 1-5"
4040
instances = 3

main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ package main
22

33
import (
44
"flag"
5+
// Embed timezone data for use in environments that may not have the
6+
// timezone database available (e.g. scratch Docker images).
7+
_ "time/tzdata"
58

69
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
710

0 commit comments

Comments
 (0)