Fix bug with timezone display
This commit is contained in:
parent
fa2ecacce5
commit
119ae9c3c6
5 changed files with 8 additions and 9 deletions
|
@ -7,6 +7,8 @@ This file keeps track of changes in more human-readable fashion
|
||||||
* Filenames are now sanitized when writing files
|
* Filenames are now sanitized when writing files
|
||||||
* "Tomorrow" in days list is now also displayed if Timezone is changed and grace period is off
|
* "Tomorrow" in days list is now also displayed if Timezone is changed and grace period is off
|
||||||
* Frontend date display now uses configured timezone
|
* Frontend date display now uses configured timezone
|
||||||
|
### v0.6.1
|
||||||
|
* Fixed date display when using `Local` timezone
|
||||||
|
|
||||||
## v0.5.0
|
## v0.5.0
|
||||||
* Added a JS prompt to create new note
|
* Added a JS prompt to create new note
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{
|
{
|
||||||
"lang": "en",
|
|
||||||
|
|
||||||
"title.today": "Your day so far",
|
"title.today": "Your day so far",
|
||||||
"title.days": "Previous days",
|
"title.days": "Previous days",
|
||||||
"title.notes": "Notes",
|
"title.notes": "Notes",
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{
|
{
|
||||||
"lang": "ru",
|
|
||||||
|
|
||||||
"title.today": "Сегодняшний день",
|
"title.today": "Сегодняшний день",
|
||||||
"title.days": "Предыдущие дни",
|
"title.days": "Предыдущие дни",
|
||||||
"title.notes": "Заметки",
|
"title.notes": "Заметки",
|
||||||
|
|
2
info.go
2
info.go
|
@ -15,7 +15,7 @@ type AppInfo struct {
|
||||||
|
|
||||||
// Info contains app information
|
// Info contains app information
|
||||||
var Info = AppInfo{
|
var Info = AppInfo{
|
||||||
Version: "0.6.0",
|
Version: "0.6.1",
|
||||||
SourceLink: "https://git.a71.su/Andrew71/hibiscus",
|
SourceLink: "https://git.a71.su/Andrew71/hibiscus",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
// Format time in "Jan 02, 2006" format
|
// Format time in "Jan 02, 2006" format
|
||||||
function formatDate(date) {
|
function formatDate(date) {
|
||||||
let dateFormat = new Intl.DateTimeFormat([langName, "en"], {
|
let options = {
|
||||||
year: 'numeric',
|
year: 'numeric',
|
||||||
month: 'short',
|
month: 'short',
|
||||||
day: 'numeric',
|
day: 'numeric'
|
||||||
timeZone: timeZone
|
}
|
||||||
})
|
if (timeZone !== "Local") { options.timeZone = timeZone }
|
||||||
|
let dateFormat = new Intl.DateTimeFormat([langName, "en"], options)
|
||||||
return dateFormat.format(date)
|
return dateFormat.format(date)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue