How to preserve time stamps of copy from a zipTree?

Continuing the discussion from Copy task does not preserve original file creation and modification time:

This question is unresolved / not answered. Because I’m stumbling over the same problem, I want to ask again: is there a way to keep timestamps when exploding from a zipTree (under Windows)? Using some closure?

Continuing the discussion from Copy task does not preserve original file creation and modification time:

There hasn’t been any progress in the meantime on the issue. Would you be interested in contributing the functionality?

I do not know much about the innards of Gradle and where to change anything. But the plain function should be easy to implement if you have the ZipEntry and the File handle.

file.setLastModified(entry.getTime())

I added the corresponding issue in JIRA to this question: GRADLE-2698. Please upvote the issue to give it a higher priority. Unfortunately, at the moment we are really clogged up with other commitments so I am not sure when we’ll get to it. A pull request would certainly help a lot.