X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=djbdns%2Fio.py;fp=djbdns%2Fio.py;h=c3952bed7da220119a68604e2ed6d0f26d098114;hb=ef87e601e2d360b66f5992adaf5416bf8b7fa8cb;hp=a3e6e430e8a7e7a19890b7d94af36eff3e42b86d;hpb=64985a196f4cb7a6c41956172ed00f43471a6974;p=djbdns-logparse.git 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