Update {{ now }} HBS helper to floor to the second instead of millisecond
This commit is contained in:
parent
6758896f57
commit
45142ba916
|
@ -112,9 +112,10 @@ module.exports.processStringSync = (string, context, opts) => {
|
|||
const template = instance.compile(string, {
|
||||
strict: false,
|
||||
})
|
||||
const now = Math.floor(Date.now() / 1000) * 1000
|
||||
return processors.postprocess(
|
||||
template({
|
||||
now: new Date().toISOString(),
|
||||
now: new Date(now).toISOString(),
|
||||
...context,
|
||||
})
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue