This is an automated archive.

The original was posted on /r/sysadmin by /u/vastarray1 on 2023-09-12 16:16:55+00:00.


We have a custom add-on for MS Word that was written 10 years ago by people no longer with the company.

This add-on basically does a date validation to make sure the document being altered is not more than one day old. If the document is older than 1 day, no changes are allowed.

Otherwise, changes are allowed.

It worked fine for ten years until yesterday morning.

Now, no users can alter these documents regardless of when they were created.

The line of code that we think suddenly became problematic is

If (dt < DateTime.Now.AddDays(-1)) ThenReturn False

I’ve done some reading and it seems that the recommended command for this is

If (dt < DateTime.Today.AddDays(-1)) Then Return False

But there’s resistance on our part to change the code since it worked since October of 2013.

Anyone able to offer any insight as to why this problem suddenly came to be?

We’ve ruled out recent Windows & browser updates. Also ruled out changes to the environment itself (the only change that occurred last week was updates to Chrome and Edge - we rolled those back to test but the problem persisted).