Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 3
    Do you really need the constraint "Without completely overhauling the entire existing application to use some library in place of all the existing invocations of DateTime.Today and DateTimeOffset.Now,", as in you don't want to search and replace through the code base? I ask because all the answers you're getting, except that gnasher729 said "you might be successful having the linker substitute an alternative", are assuming you don't actually need the constraint. Which might be a legitimate challenge to your premise, but if you really need it you should explain why. Commented Apr 15 at 23:50
  • For example if the reason is that you don't know how to enforce for the future a rule on your project like, "Never call DateTimeOffset.Now, call this instead", then maybe someone would offer help with enforcing the rules they're proposing. Commented Apr 15 at 23:53