I have just managed to solve this problem. so I share it here, maybe someone else can also make use of it.
1. clone the javasript $:/core/modules/macros/now.js to $:/USERNAME/modules/macros/utc.js
2. change the line
exports.name = "utc";
this will be the name of the new macro
and change the macro part to:
/*
Run the macro
*/
exports.run = function(format) {
var now = new Date();
return $tw.utils.formatDateString(new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds()),format || "YYYY0MM0DD0hh0mm0ss");
};
now I can use <<utc>> and get an utc timestamp.
I don't know javascript at all, I just searched on the web and happened to find a workable solution. probably there are better ways to do this.
for other beginner like me: you need to refresh the TW5 before the javascript macro can be used.
I wish all have a nice day!
chaonuo