http://www.sapbasis1solution.com/how-to-prepare-sap-system-f...
During this time of one hour “Fall Back” on the clock, as is our Basis team best practice (SAP Note #7417, #102088 and others) we intend to gracefully shut down all Production applications prior to 2:00 AM, at which time the “fall back” happens that will revert back clock time by one hour. We would then wait for clock time to advance past the “new” 2:00 AM Local time. And start from 2:05 AM EST will bring up applications.Like, I’m not convinced “turn it off” isn’t an improvement.
They're that bad.
Empirically, it's associated with a higher rate of medical errors, which is a big part of the drive for electronic records.
What I like to do to avoid this situation is to use property-based testing to test that the code works for all dates in the desired time span. For Python I use hypothesis [1] in combination with freezegun [2] for that. Here is an example of how that could look like:
from datetime import datetime, timezone as tz
from freezegun import freeze_time
from hypothesis import given, strategies as st
def business_logic():
# TODO: Refactor before 2038!
if datetime.now(tz=tz.utc) > datetime(2038, 1, 19, 3, 14, 7, tzinfo=tz.utc):
raise Exception("This code is not working after UNIX time overflow")
...
@given(dt=st.datetimes(max_value=datetime(9999, 12, 31, 23, 59, 59), timezones=st.just(tz.utc)))
def test_business_logic(dt):
with freeze_time(dt):
business_logic()
test_business_logic()
[1]: https://hypothesis.readthedocs.io/en/latest/>don't test behavior with different dates
It basically tests with different dates every time it's run.
That seems different from what I understand by "continuous integration".
Long quiet pause, then a series of curses. So we deployed at 2am instead.
> Something I added to my own Software Engineering and Testing standard practices.
Noted.
Making sure it works at the business domain level is another thing entirely.
Most tests are written with a fixed date, or now(). Instead, using now()+delta can help discover future bugs and give you some time to remedy the issue. Often annoying to write tests like that, though, without them breaking for unrelated/timing issues compared to a fixed value.
It's a nice early-warning system for Y2K or Y2038-like problems.
This is fuzzing: https://en.wikipedia.org/wiki/Fuzzing
Fuzzing would be testing the date parser by passing it '25-44-2021' to see what breaks.
Invalid input is invalid input
Inputs don't have to be invalid for it to be fuzzing.
Here's the original link https://github.com/rails/rails/issues/5239
Unfortunately, they fixed the date and his bender account got renamed.
Without this, there's no value in running a duplicate environment like this. Automated tests won't capture human interaction perfectly...
Several European Central Banks were unable to process transactions ;-). Can't provide more details, to protect the innocent. Since then, it has been a standard within the Testing group of that vendor to always have a running platform setup with a date 6 months ahead ( clock sync from a different source ). Something I added to my own Software Engineering and Testing standard practices.