Skip to main content

Which time zone IIS logs are recorded in?

IIS logs are helpful in troubleshooting various web application issues. However, they may mislead server administrators by showing the logs in a time zone different than what the server uses. This is because IIS uses UTC time zone by default.

Time zone options for IIS logs

There are 3 log file formats in IIS. The time zone of the logs is determined by these log file formats:

  1. W3C (default format): UTC time zone
  2. IIS: Local time
  3. NCSA: Local time zone
Time zones for IIS logs

If you want IIS to log in your server’s time zone, you can change the log file format to IIS or NCSA in the Logging feature of IIS. This change won’t affect IIS. However, it may affect the third-part monitoring tools because the order of the columns and data formats change in the log file.

Not seeing logs for your requests? It might be because of missing bindings in IIS. Here is the solution: Missing bindings in IIS (net.tcp, net.pipe, net.msmq, msmq.formatname)

Sample logs for each log file format (Reference):

W3C:

#Software: Internet Information Services 6.0 
#Version: 1.0 
#Date: 2001-05-02 17:42:15 
#Fields: time c-ip cs-method cs-uri-stem sc-status cs-version 
17:42:15 172.16.255.255 GET /default.htm 200 HTTP/1.0 

IIS:

192.168.114.201, -, 03/20/01, 7:55:20, W3SVC2, SALES1, 172.21.13.45, 4502, 163, 3223, 200, 0, GET, /DeptLogo.gif, -, 
172.16.255.255, anonymous, 03/20/01, 23:58:11, MSFTPSVC, SALES1, 172.16.255.255, 60, 275, 0, 0, 0, PASS, /Intro.htm, -, 

NCSA:

172.21.13.45 - Microsoft\fred [08/Apr/2001:17:39:04 -0800] "GET /scripts/iisadmin/ism.dll?http/serv HTTP/1.0" 200 3401

If you choose IIS or NCSA and the log time zone is still not what you want it to be, you will need to change the Regional Settings of your server which may affect IIS.

You can use IIS logs for determining what browsers your visitors use. For details, check this post out: How to Create a Report of Browser Versions from IIS Logs?

Leave a Reply

Your email address will not be published. Required fields are marked *