IIS 7 and Above
Configuration & Scripting
IIS Time Stays System Boot Time
Last post Aug 07, 2019 01:31 PM by aaronk
Aug 01, 2019 08:05 PM|aaronk|LINK
We're running IIS in a CI/CD process where we build a new VM, join it to domain, install a web app, etc.
The new VM is cloned from a template that has IIS pre-installed to save time.
The issue we're facing is this:
Machine boots, joins domain, syncs time, updates time. IIS stays the same time as system time when the machine booted and doesn't update the time in IIS logs. Once current system time passes the boot time that's in future, the IIS logs show current time.
This is causing an issue in troubleshooting.
We've tried a number of workarounds and nothing has worked thus far. Any idea how to force IIS to honor current system time? Or how to sync time before IIS starts.
Aug 02, 2019 06:17 AM|Able|LINK
According to your description, I couldn't understand the problem you said. Time in iis is just same with system time in local machine.So, you mean the time recorded in iis log is not same with system time in machine?
Aug 02, 2019 02:22 PM|aaronk|LINK
IIS logs don't match system time for several hours. IIS logs show boot time. Once the system time passes the boot time, the IIS logs start showing system time.
Does that make sense?
Aug 06, 2019 05:06 PM|Rovastar|LINK
By default IIS with store time in GMT. Is that what you are seeing? Hours offset to local system time.
Aug 06, 2019 06:02 PM|aaronk|LINK
It's more complicated than that. Maybe this makes more sense. This is a represenation of what the IIS log timestamps look like.
System Boots 12:00:00 GMT (16:00:00 Local time)
Aug 06, 2019 07:37 PM|Rovastar|LINK
not see that before. Did you do an iisreset?
Aug 07, 2019 01:31 PM|aaronk|LINK
Yep, made no difference. Once it starts logging that way (for example if IIS is enabled when the machine boots), the only thing that fixes it immediately is a reboot of the machine.