Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungRate Limiting: The Traffic Cop Your API Needs(20.09.2026 um 14:51 Uhr)
Sichere ProgrammierungI Built the MVP First. Then I Wrote the README.(20.09.2026 um 14:51 Uhr)
Sichere ProgrammierungHow to add a loading screen with a progress bar in Godot 4(20.09.2026 um 14:52 Uhr)
Sichere ProgrammierungCanada is about to break your scheduler(20.09.2026 um 14:59 Uhr)
Sichere ProgrammierungWhat Does an AI Automation Agency Actually Do?(20.09.2026 um 15:00 Uhr)
Sichere ProgrammierungRate Limiting: The Traffic Cop Your API Needs(20.09.2026 um 14:51 Uhr)
Sichere ProgrammierungI Built the MVP First. Then I Wrote the README.(20.09.2026 um 14:51 Uhr)
Sichere ProgrammierungHow to add a loading screen with a progress bar in Godot 4(20.09.2026 um 14:52 Uhr)
Sichere ProgrammierungCanada is about to break your scheduler(20.09.2026 um 14:59 Uhr)
Sichere ProgrammierungWhat Does an AI Automation Agency Actually Do?(20.09.2026 um 15:00 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Date Shear: A New Term for a Common Programming Pain Point

Reagiere als Erste:r — dein Feedback zählt!

One of the sneakiest, hardest to explain bugs. The process works fine any day you test it, but occasionally - and only occasionally it's just... wrong. Test it again and it's fine, no matter what day you test it.

This particular issue stems from a habit of grabbing a datetime whenever you need it, but coding as if you were getting the same value each time. It's an easy to explain issue, but there's not a term for it (as far as I can tell), so, I coined one: Date Shear.

What is Date Shear?

Date Shear (noun): Insidiously difficult to reproduce bugs that occur due to code fetching the "current time" multiple times, while the logic expects the same value. The result can be catastrophically incorrect behavior if the code is executed across a day, month or year boundary.

A Common Example

Imagine building a Quarterly report based on the current day:

  1. Just before midnight, a GetDate() or similar method gets the current datetime, and uses that to determine the start date for the "current" quarter.
  2. (Clock ticks midnight)
  3. Just after midnight, a GetDate() or similar method gets the current datetime, again (but it's now in the next month) and uses that to determine the end date for the "current" quarter.

Now, you end up with the start of one quarter and - potentially - the end of the next quarter. This only happens if the request crosses into the next day, on the last day of the month, in the last month of a quarter.

Adding to the annoyance is that reports are often run by companies as part of an overnight batch process, increasing the likelihood of this occurring in a production environment... but testers are less likely to be testing functionality in the middle of the night - and daytime testing won't reproduce the issue.

Why Naming This Matters

They say that "naming something gives it power"... but I would say that naming something gives you power over it. When we name a specific type of bug, we make it easier to communicate during code reviews and architectural planning. Instead of saying, "We need to double check the date handling to see if there's something fishy in there," you can simply say, "We need to guard against Date Shear here."

The Solution for Date Shear

In simple single-script or single-method processes, the solution is simple. Grab a datetime at the beginning, store it in a variable and reuse it. In some cases, taking a parameter of the date in question is a good way to handle it.

For processes that call other processes (that may call further processes), taking the date in question in as a parameter allows them to all "be on the same page".

What do you think? Have you encountered "Date Shear" in your own projects? Is there a better name for this that I'm somehow missing?

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Date Shear: A New Term for a Common Programming Pain Point

Thematisch verwandte Begriffe: Date, Shear, Term, Common · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-93956 | A flaw has been found in olivier-ls PHP-FTS up to 1.1.2. Affected by thi…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick