Skip to content

Commit

Permalink
Reduce allocation churn
Browse files Browse the repository at this point in the history
  • Loading branch information
SmilyOrg committed Oct 9, 2023
1 parent b718528 commit f6fe34b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/image/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ func (source *Database) GetBatch(ids []ImageId) <-chan InfoListResult {
unix := stmt.ColumnInt64(5)
timezoneOffset := stmt.ColumnInt(6)

info.DateTime = time.Unix(unix, 0).In(time.FixedZone("tz_offset", timezoneOffset*60))
info.DateTime = time.Unix(unix, 0).In(time.FixedZone("", timezoneOffset*60))
info.DateTimeNull = stmt.ColumnType(5) == sqlite.TypeNull

info.LatLngNull = stmt.ColumnType(7) == sqlite.TypeNull || stmt.ColumnType(8) == sqlite.TypeNull
Expand Down Expand Up @@ -1393,7 +1393,7 @@ func (source *Database) List(dirs []string, options ListOptions) <-chan InfoList
unix := stmt.ColumnInt64(5)
timezoneOffset := stmt.ColumnInt(6)

info.DateTime = time.Unix(unix, 0).In(time.FixedZone("tz_offset", timezoneOffset*60))
info.DateTime = time.Unix(unix, 0).In(time.FixedZone("", timezoneOffset*60))
info.DateTimeNull = stmt.ColumnType(5) == sqlite.TypeNull

info.LatLngNull = stmt.ColumnType(7) == sqlite.TypeNull || stmt.ColumnType(8) == sqlite.TypeNull
Expand Down

0 comments on commit f6fe34b

Please sign in to comment.