Hello Nitin,
The time stamp of a message is contained in header part. So in order to record the time stamp there is one mandatory requisite that time should be present in ASMA settings. AFAIK, in ASMA settings we have File Name, Contract etc. So, in my opinion java code is not possible to get timestamp.
However you can achieve the same in ABAP coding (in the form of proxy code) which will be present in every sync for response.
The variable for date is SY-DATUM and that for time zone is SY-UZEIT. In the coding part you can concatenate these two variables and pass it to the subsequent systems which you have explained above in the payload as an extra field.
I hope I was clear enough in my explanation
.
Kind Regards,
Souvik