There is one function in the python that builds both the .def files and the .pg files at the same time. It used to be that the only purpose of the .pg files was for packaging with the .def files, so making the two things at the same time made sense.
Now the .pg files are needed for more. They are built very early in the processing of source files. And when the script requests rendering to static PTX, these .pg files are the "source" for whatever is doing that rendering. So we always need to make these .pg files. Currently, the .def files just always come along for the ride since we are using the same function.
Yes, we could separate these things (.pg and .def production). But it's not something I would float to the top of my to-do too soon.
Here is something you could consider doing. In pretext-ww-problem-sets.xsl, there are blocks that set these three dates:
openDate
dueDate
answerDate
I think it's not helpful that currently, these dates are set based on the date you are processing your project. Surely if someone needs to use the .def file, they will have to change those dates after they import the set.
An option: Just remove those date setting blocks from the .def file. The set can still be imported, and the user will see warning messages that no dates were in place. The import will still happen, using WeBWorK's own default date setting scheme.
Another option: Set those dates to be fixed. Like opening on Jan 1, 2026, closing on Jan 1, 2036. Or something like that. Note that alll but the most recent versions of WW require no more than 10 years in between open date and due date.
You could do either of these and the date diff annoyance would go away. And I don't think anyone would complain.