IIS Time Stays System Boot TimeRSS

6 replies

Last post Aug 07, 2019 01:31 PM by aaronk

  • IIS Time Stays System Boot Time

    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.

  • Re: IIS Time Stays System Boot Time

    Aug 02, 2019 06:17 AM|Able|LINK

    Hi aaronk, 

    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?

    Best Regards

    Able

    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
  • Re: IIS Time Stays System Boot Time

    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?

  • Rovastar Rovastar

    5445 Posts

    MVP

    Moderator

    Re: IIS Time Stays System Boot Time

    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.

    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: IIS Time Stays System Boot 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)

    System Time (local TZ) IIS Log Entry Time
    16:02:00 12:00:00
    18:23:00 12:00:00
    19:25:00 12:00:00
    19:33:00 12:00:00
    19:52:00 12:00:00
    20:00:00 12:00:00
    20:01:00 16:01:00
    21:22:00 17:22:00
    23:53:00 19:53:00
  • Rovastar Rovastar

    5445 Posts

    MVP

    Moderator

    Re: IIS Time Stays System Boot Time

    Aug 06, 2019 07:37 PM|Rovastar|LINK

    not see that before. Did you do an iisreset?

    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: IIS Time Stays System Boot Time

    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.