Skip to content
Snippets Groups Projects
Commit a828cb78 authored by Brett Smith's avatar Brett Smith Committed by Chris Lamb
Browse files

set_locale should call tzset. (Closes: #848249)


This is necessary to update timezone information for C code we've pulled in
that might've already called it.  In particular, the python-magic libmagic
wrapper can be affected by this, and print out gzip mtimes in the user's
timezone.

Signed-off-by: Chris Lamb's avatarChris Lamb <lamby@debian.org>
parent 3e748664
Branches
Tags
No related merge requests found
......@@ -23,6 +23,7 @@ import logging
import platform
import tempfile
import functools
import time
from distutils.spawn import find_executable
......@@ -90,6 +91,7 @@ def set_locale():
os.environ[var] = 'C'
os.environ['LC_CTYPE'] = 'C.UTF-8'
os.environ['TZ'] = 'UTC'
time.tzset()
temp_files = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment