mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-11 15:27:37 +00:00
Fix 764 (#2093)
* Fix KeyExpiration when a zero time value has a timezone When a zero time value is loaded from JSON or a DB in a way that assigns it the local timezone, it does not roudtrip in JSON as a value for which IsZero returns true. This causes KeyExpiry to be treated as a far past value instead of a nilish value. See https://github.com/golang/go/issues/57040 * Fix whitespace * Ensure that postgresql is used for all tests when env var is set * Pass through value of HEADSCALE_INTEGRATION_POSTGRES env var * Add option to set timezone on headscale container * Add test for registration with auth key in alternate timezone
This commit is contained in:
@@ -211,6 +211,12 @@ func WithTuning(batchTimeout time.Duration, mapSessionChanSize int) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func WithTimezone(timezone string) Option {
|
||||
return func(hsic *HeadscaleInContainer) {
|
||||
hsic.env["TZ"] = timezone
|
||||
}
|
||||
}
|
||||
|
||||
// New returns a new HeadscaleInContainer instance.
|
||||
func New(
|
||||
pool *dockertest.Pool,
|
||||
|
Reference in New Issue
Block a user