From ef87e601e2d360b66f5992adaf5416bf8b7fa8cb Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 23 Sep 2022 08:04:34 -0400 Subject: [PATCH] djbdns/io.py: fix test that fails in other timezones. --- djbdns/io.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/djbdns/io.py b/djbdns/io.py index a3e6e43..c3952be 100644 --- a/djbdns/io.py +++ b/djbdns/io.py @@ -24,6 +24,8 @@ def parse_logfile(file : TextIO): >>> from tempfile import NamedTemporaryFile >>> with NamedTemporaryFile(mode="w", delete=False) as f: ... _ = f.write(line) + >>> from os import environ + >>> environ["TZ"] = "UTC+4" >>> f = open(f.name, 'r') >>> parse_logfile(f) 2022-09-14 21:04:40.206516500 dropped query (no authority) from 127.0.0.1:40289 (id 48745): a www.example.com -- 2.44.2