From /echo in the help file:

Quote:
The -tN switch prefixes the line with a timestamp if global time stamping is on or timestamping is on for that window. N is optional and is the UTC value to use for the timestamp.

In this case, you could specify $msgstamp as the N value. Does that do what you are expecting?