mirror of
https://github.com/miniflux/v2.git
synced 2025-08-16 18:01:37 +00:00
fix: replace timezone function call with view
The `pg_timezone_names` view was added in 8.2. It should be equivalent to the function query. See: https://pgpedia.info/p/pg_timezone_names.html This small change allows `miniflux` to run on postgres-compatible databases like CockroachDB, which don't have this function.
This commit is contained in:
parent
b2e702218d
commit
3a966c6ce5
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ import (
|
|||
// Timezones returns all timezones supported by the database.
|
||||
func (s *Storage) Timezones() (map[string]string, error) {
|
||||
timezones := make(map[string]string)
|
||||
rows, err := s.db.Query(`SELECT name FROM pg_timezone_names() ORDER BY name ASC`)
|
||||
rows, err := s.db.Query(`SELECT name FROM pg_timezone_names ORDER BY name ASC`)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf(`store: unable to fetch timezones: %v`, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue