Newman HTML report with hbs to show time zone

Archived topic — this may be out of date.
Newman has been replaced by the Postman CLI, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.
Working with an AI coding agent? The Postman plugin lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.
For current help, see the Postman docs, try the free Postman tools (no account needed), or join us on Discord.

Hi

I am using htmlextra report with .hbs template to create a dashboard of test execution using newman and postman collection. The sample hbs file was shared by @danny-dainton. I have customized it according to our requirement.

It is working fine. No issues. The time is displayed as below. I would like to show this time with timezone. Examples: PDT America/Los_Angeles and Indian Standard time.

I tried adding “ZZ” to moment date. It shows UTC time as “Thursday, 23 May 2019 14:53:59 -0700”. [

{{moment date format=“dddd, DD MMMM YYYY HH:mm:ss ZZ”}}

]

Should I write JS function to get the date and time with time zone? OR is there a simple way to show the time in specific zone like PDT zone?

Thursday, 23 May 2019 14:53:59

Here is the snippet from hbs file.

"

Dashboard

{{moment date format="dddd, DD MMMM YYYY HH:mm:ss "}}

"

How this is executed: newman run collections/QE_tests.json -e collections/env.json -r htmlextra --reporter-htmlextra-export statusdashboard.html --reporter-htmlextra-template test.hbs

Thanks, rjayaram

Hey @rjayaram

The helper-moment module that’s being use to create that timestamp doesn’t support timezones. This is an issue that has been raised on that project from another user.

I’ll take a look at trying to get that support into the reporter but for now, with the current code, it’s not possible.

OK @danny-dainton. Thanks for the update. I managed it by using zone option to show UTC offset and provided a label specifying the name of the time zone.