Yes, something like this:
INT 21h / AH=2Dh - set time to desired value
INT 21h / AH=39h - create directory, with current time... ie. the desired time!
INT 1Ah / AH=04h, INT 1Ah / AH=02h - get date and time from RTC
INT 21h / AH=2Dh - set DOS date/time to values read from RTC
But this would only work on AT or later, there's no standardized way to access the RTC on PC/XT.
Also, it should be noted that "INT 21h / AH=39h" may take quite some time, eg. when working on a diskette - turn on the drive motor, wait for it to spin up, wait for the stepper to position the heads, and so on, that would be hundreds on milliseconds...
but time stamp granularity in DOS is 2 seconds, right? So perhaps not a problem?
Nie tylko, jak widzicie, w tym trudność, że nie zdołacie wejść na moją górę, lecz i w tym, że ja do was cały zejść nie mogę, gdyż schodząc, gubię po drodze to, co miałem donieść.