0

I have python 2.7.5(linux) and 2.7.12(anaconda, windows) installed. My logger looks like:

formatter = logging.Formatter( %(w)s - %(k)s - %(v)s',
                                  datefmt='%d/%b/%Y:%H:%M:%S %z')

Linux:

- 10/May/2017:07:15:36 +0000 -

Windows(anaconda)

- 10/May/2017:16:23:15 Central Europe Daylight Time -

Anybody has an idea how to get rid of "Central Europe Daylight Time" and have +0000 instead ????

user2156115
  • 1,169
  • 4
  • 17
  • 30

1 Answers1

0

Actually the problem isn't with your code. Unfortunately the libraries under Windows don't support %z flag, and Python relies on those libraries.

From the documentation:

The use of %Z is now deprecated, but the %z escape that expands to the preferred hour/minute offset is not supported by all ANSI C libraries.

Chaker
  • 1,197
  • 9
  • 22