5 ms·
The problem is that developers do not know that they mustn't call datetime.now() and there will always be a developer who doesn't know this, either because peop
by implicit 11y ago
The problem is that developers do not know that they mustn't call datetime.now() and there will always be a developer who doesn't know this, either because people have a tough time knowing everything, or just because you're hiring new people.
Wouldn't it be nice if you could just obstruct such patterns within the first millisecond of their first interaction with the compiler?
- crdoconnor 11y agoI don't have a problem with it. I send a mocked time to the application under test using libfaketime using this: http://hitchtest.com http://hitchtest.com Et voila, no more time issues.
- peteretep 11y ago> developers do not know that they mustn't call > datetime.now() Plenty of languages where it's easy to mock the equivalent to that call.