From 7b6ad7db4ae3058d5cf0d8858cdb24d44224ef69 Mon Sep 17 00:00:00 2001 From: Mark Date: Sun, 4 Jun 2017 19:25:52 -0700 Subject: [PATCH] Add ability to now macro to return same UTC string used in the modified and created fields. --- core/modules/macros/now.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/modules/macros/now.js b/core/modules/macros/now.js index d0a15dce2..90b794ab7 100644 --- a/core/modules/macros/now.js +++ b/core/modules/macros/now.js @@ -26,6 +26,9 @@ exports.params = [ Run the macro */ exports.run = function(format) { +if(format == "UTC") { + return $tw.utils.stringifyDate(new Date()); +} else return $tw.utils.formatDateString(new Date(),format || "0hh:0mm, DDth MMM YYYY"); };