action-debian-package/node_modules/pino/lib/time.js

12 lines
328 B
JavaScript
Raw Normal View History

2020-03-26 14:37:35 +00:00
'use strict'
const nullTime = () => ''
const epochTime = () => `,"time":${Date.now()}`
const unixTime = () => `,"time":${Math.round(Date.now() / 1000.0)}`
const isoTime = () => `,"time":"${new Date(Date.now()).toISOString()}"` // using Date.now() for testability
module.exports = { nullTime, epochTime, unixTime, isoTime }