diff options
| author | Bruce <half-life@jibudata.com> | 2024-10-31 23:40:05 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-31 08:40:05 -0700 |
| commit | 0060a2cf9ca25f89a252538bf6ca5ac62e6aa65a (patch) | |
| tree | 167b1596f2f66a9ba0f2a54800f196446da4ae84 /weed/util/time.go | |
| parent | c29c912bdccd60a4de11c382cdab1819197216e6 (diff) | |
| download | seaweedfs-0060a2cf9ca25f89a252538bf6ca5ac62e6aa65a.tar.xz seaweedfs-0060a2cf9ca25f89a252538bf6ca5ac62e6aa65a.zip | |
Fix 6181/6182 (#6183)
* set larger buf size for LogBuffer
* jump to next day when no more entry found
* Update weed/filer/filer_notify_read.go
---------
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Diffstat (limited to 'weed/util/time.go')
| -rw-r--r-- | weed/util/time.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/weed/util/time.go b/weed/util/time.go new file mode 100644 index 000000000..8e237b72d --- /dev/null +++ b/weed/util/time.go @@ -0,0 +1,13 @@ +package util + +import ( + "time" +) + +func GetNextDayTsNano(curTs int64) int64 { + curTime := time.Unix(0, curTs) + nextDay := curTime.AddDate(0, 0, 1).Truncate(24 * time.Hour) + nextDayNano := nextDay.UnixNano() + + return nextDayNano +} |
