Fix bug with timezone display
This commit is contained in:
parent
fa2ecacce5
commit
119ae9c3c6
5 changed files with 8 additions and 9 deletions
|
@ -1,11 +1,12 @@
|
|||
// Format time in "Jan 02, 2006" format
|
||||
function formatDate(date) {
|
||||
let dateFormat = new Intl.DateTimeFormat([langName, "en"], {
|
||||
let options = {
|
||||
year: 'numeric',
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
timeZone: timeZone
|
||||
})
|
||||
day: 'numeric'
|
||||
}
|
||||
if (timeZone !== "Local") { options.timeZone = timeZone }
|
||||
let dateFormat = new Intl.DateTimeFormat([langName, "en"], options)
|
||||
return dateFormat.format(date)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue