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