mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-08 23:18:15 -07:00
fix: respect client timezone for requests (#119)
* maybe fixed for total listen activity * maybe actually fixed now * fix unset location panics
This commit is contained in:
parent
2925425750
commit
f48dd6c039
13 changed files with 368 additions and 343 deletions
|
|
@ -127,6 +127,12 @@ func DateRange(week, month, year int) (time.Time, time.Time, error) {
|
|||
return start, end, nil
|
||||
}
|
||||
|
||||
// Returns a time.Time that represents the first moment of the day of t.
|
||||
func BeginningOfDay(t time.Time) time.Time {
|
||||
year, month, day := t.Date()
|
||||
return time.Date(year, month, day, 0, 0, 0, 0, t.Location())
|
||||
}
|
||||
|
||||
// CopyFile copies a file from src to dst. If src and dst files exist, and are
|
||||
// the same, then return success. Otherise, attempt to create a hard link
|
||||
// between the two files. If that fail, copy the file contents from src to dst.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue