withTimezoneUTC ensures that we don't just sprinkle dbtestutil.WithTimezone("UTC") about to work around real timezone bugs in our code. nolint:unused,deadcode,varnamelen
(m dsl.Matcher)
| 451 | // |
| 452 | //nolint:unused,deadcode,varnamelen |
| 453 | func withTimezoneUTC(m dsl.Matcher) { |
| 454 | m.Match( |
| 455 | `dbtestutil.WithTimezone($tz)`, |
| 456 | ).Where( |
| 457 | m["tz"].Text.Matches(`[uU][tT][cC]"$`), |
| 458 | ).Report(`Setting database timezone to UTC may mask timezone-related bugs.`). |
| 459 | At(m["tz"]) |
| 460 | } |
| 461 | |
| 462 | // workspaceActivity ensures that updating workspace activity is only done in the workspacestats package. |
| 463 | // |