An anonymous submission reviewed by Remy Porter turns a trivial legacy-Java time lookup into a small ceremony. The code creates a Date for the current moment, obtains its millisecond value, wraps that value in a Timestamp, reads it back, and constructs another Date. Java’s old date APIs were clumsy. This chain was added by application code; the library did not demand it.
Remy Porter’s CodeSOD item for The Daily WTF, dated 2026-10-05, presents an anonymous submission containing legacy Java. The stated job is to find the current time.
legacy-java.txt
Timestamp current = new Timestamp(new Date().getTime());
Date date = new Date(current.getTime());
`new Date()` already creates a date-time object for the current moment, and `getTime()` returns its time value. The submitted sequence creates a Date, passes its value into a Timestamp, reads the value back, and uses it to create another Date. Porter says Java’s older date classes were poorly designed, but the API did not require this chain. It was application-made complexity.
A revisited Daily WTF classic follows developer Adam C., hired to fix a VXML platform that kept collapsing under light load. Digging through logs full…
On September 17, 2026, Remy Porter’s CodeSOD column showed a GPL header from Oracle code with “2013” repeated across a massive block. The page notes t…
A VLD dump against PHP 8.3.6 shows declare(strict_types=1) leaves the bytecode untouched: same RECV, same VERIFY_RETURN_TYPE, one file-level flag. Tha…
TimWolla posted a link to the PHP internals proposal for Time\Instant and Time\Clock on r/PHP. A commenter compared the design to C# NodaTime and cloc…
Comments
No comments yet — be the first.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Nothing arrived? Check your spam folder — and mark the mail as "Not spam" so it lands in your inbox next time.