Skip to content

Commit

Permalink
Merge pull request #6 from XeR/main
Browse files Browse the repository at this point in the history
Dates: use default locale to display dates
  • Loading branch information
aiooss-anssi authored Jul 22, 2024
2 parents 6568dbf + e5733a4 commit 3df3d20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions webapp/static/js/flowdisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ class FlowDisplay {
fractionalSecondDigits: 3
}
const dateStart = new Date(flow.flow.ts_start)
const formatedDateStart = new Intl.DateTimeFormat('en-US', dateParams).format(dateStart)
const formatedDateStart = new Intl.DateTimeFormat(undefined, dateParams).format(dateStart)
const dateEnd = new Date(flow.flow.ts_end)
const formatedDateEnd = new Intl.DateTimeFormat('en-US', dateParams).format(dateEnd)
const formatedDateEnd = new Intl.DateTimeFormat(undefined, dateParams).format(dateEnd)

// Change document title
document.title = `${flow.flow.dest_ipport} - Shovel`
Expand Down
2 changes: 1 addition & 1 deletion webapp/static/js/flowlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ class FlowList {
flows.forEach((flow) => {
const date = new Date(flow.ts_start)
const startDate = new Intl.DateTimeFormat(
'en-US',
undefined,
{ hour: 'numeric', minute: 'numeric', second: 'numeric', fractionalSecondDigits: 1 }
).format(date)

Expand Down

0 comments on commit 3df3d20

Please sign in to comment.