The direct "immutable" equivalent of the bug code (purely based on my experience with .NET Core immutable collections) would have the setX methods return a new immutable datetime with the field set as requested. So just "use an immutable type" wouldn't fix this bug.
"Change the code completely so you supply all 3 components at the same time" obviously fixes the bug, but that doesn't require an immutable type.