rss email digests over ssh because you're a cool kid herald.dunkirk.sh
go rss rss-reader ssh charm
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: store timestamps in utc

dunkirk.sh 5e0e6d33 384c53a4

verified
+52 -12
+40
crush.json
··· 1 + { 2 + "$schema": "https://charm.land/crush.json", 3 + "lsp": { 4 + "gopls": { 5 + "options": { 6 + "gofumpt": true, 7 + "codelenses": { 8 + "gc_details": true, 9 + "generate": true, 10 + "run_govulncheck": true, 11 + "test": true, 12 + "tidy": true, 13 + "upgrade_dependency": true 14 + }, 15 + "hints": { 16 + "assignVariableTypes": true, 17 + "compositeLiteralFields": true, 18 + "compositeLiteralTypes": true, 19 + "constantValues": true, 20 + "functionTypeParameters": true, 21 + "parameterNames": true, 22 + "rangeVariableTypes": true 23 + }, 24 + "analyses": { 25 + "nilness": true, 26 + "unusedparams": true, 27 + "unusedvariable": true, 28 + "unusedwrite": true, 29 + "useany": true 30 + }, 31 + "staticcheck": true, 32 + "directoryFilters": [ 33 + "-.git", 34 + "-node_modules" 35 + ], 36 + "semanticTokens": true 37 + } 38 + } 39 + } 40 + }
+6 -6
scheduler/scheduler.go
··· 179 179 } 180 180 }() 181 181 182 - now := time.Now() 182 + now := time.Now().UTC() 183 183 configs, err := s.store.GetDueConfigs(ctx, now) 184 184 if err != nil { 185 185 s.logger.Error("failed to get due configs", "err", err) ··· 257 257 s.logger.Debug("RunNow: feed metadata updated") 258 258 259 259 s.logger.Debug("RunNow: calculating next run") 260 - now := time.Now() 261 - nextRun, err := gronx.NextTick(cfg.CronExpr, false) 260 + now := time.Now().UTC() 261 + nextRun, err := gronx.NextTick(cfg.CronExpr, true) 262 262 if err != nil { 263 263 return stats, fmt.Errorf("calculate next run: %w", err) 264 264 } ··· 277 277 func (s *Scheduler) collectNewItems(ctx context.Context, results []*FetchResult) ([]email.FeedGroup, int, error) { 278 278 var feedGroups []email.FeedGroup 279 279 totalNew := 0 280 - maxAge := time.Now().Add(-itemMaxAge) 280 + maxAge := time.Now().UTC().Add(-itemMaxAge) 281 281 feedErrors := 0 282 282 283 283 for _, result := range results { ··· 486 486 } 487 487 } 488 488 489 - now := time.Now() 490 - nextRun, err := gronx.NextTick(cfg.CronExpr, false) 489 + now := time.Now().UTC() 490 + nextRun, err := gronx.NextTick(cfg.CronExpr, true) 491 491 if err != nil { 492 492 return fmt.Errorf("calculate next run: %w", err) 493 493 }
+1 -1
ssh/commands.go
··· 288 288 } 289 289 290 290 func formatRelativeTime(t time.Time) string { 291 - now := time.Now() 291 + now := time.Now().UTC() 292 292 diff := t.Sub(now) 293 293 294 294 if diff < 0 {
+1 -1
ssh/scp.go
··· 182 182 } 183 183 184 184 func calculateNextRun(cronExpr string) (time.Time, error) { 185 - return gronx.NextTick(cronExpr, false) 185 + return gronx.NextTick(cronExpr, true) 186 186 } 187 187 188 188 type configFileInfo struct {
+3 -3
store/configs.go
··· 49 49 InlineContent: inline, 50 50 RawText: rawText, 51 51 NextRun: sql.NullTime{Time: nextRun, Valid: true}, 52 - CreatedAt: time.Now(), 52 + CreatedAt: time.Now().UTC(), 53 53 }, nil 54 54 } 55 55 ··· 78 78 InlineContent: inline, 79 79 RawText: rawText, 80 80 NextRun: sql.NullTime{Time: nextRun, Valid: true}, 81 - CreatedAt: time.Now(), 81 + CreatedAt: time.Now().UTC(), 82 82 }, nil 83 83 } 84 84 ··· 219 219 return err 220 220 } 221 221 222 - nextRun, err := gronx.NextTick(cfg.CronExpr, false) 222 + nextRun, err := gronx.NextTick(cfg.CronExpr, true) 223 223 if err != nil { 224 224 return fmt.Errorf("calculate next run: %w", err) 225 225 }
+1 -1
store/users.go
··· 42 42 ID: id, 43 43 PubkeyFP: pubkeyFP, 44 44 Pubkey: pubkey, 45 - CreatedAt: time.Now(), 45 + CreatedAt: time.Now().UTC(), 46 46 }, nil 47 47 } 48 48