steve/pkg/resources/common
Wolfgang Jung 10d0492ae3
Fixes parsing of resources older than 2 year (#784)
- Similar assumption as 24h per day:
  365 days per year, ignoring DST and leap-years

Very old resources (older than 2 years) are printed as `2y15d` instead of using just the number of days.

This leads to parser errors for namespaces in rancher:
```
2025/08/18 14:43:34 [WARNING] convert timestamp value: 2y114d failed with error: strconv.ParseInt: parsing "2y114d": invalid syntax
2025/08/18 14:43:34 [WARNING] convert timestamp value: 3y50d failed with error: strconv.ParseInt: parsing "3y50d": invalid syntax
2025/08/18 14:43:34 [WARNING] convert timestamp value: 2y163d failed with error: strconv.ParseInt: parsing "2y163d": invalid syntax
2025/08/18 14:43:34 [WARNING] convert timestamp value: 3y50d failed with error: strconv.ParseInt: parsing "3y50d": invalid syntax
```

Relates to https://github.com/rancher/steve/pull/684

Co-authored-by: Wolfgang Jung <wolfgang.jung@loewenfels.ch>
2025-08-19 13:11:57 -03:00
..
duration.go Fixes parsing of resources older than 2 year (#784) 2025-08-19 13:11:57 -03:00
duration_test.go Fixes parsing of resources older than 2 year (#784) 2025-08-19 13:11:57 -03:00
dynamiccolumns.go
formatter.go Revert "Revert "Make view link related to GET RBAC permission. (#699)" (#703)" (#704) 2025-07-18 15:36:53 -07:00
formatter_test.go Revert "Revert "Make view link related to GET RBAC permission. (#699)" (#703)" (#704) 2025-07-18 15:36:53 -07:00
gvkdatefields.go Fix CRD `Created At` field (#723) 2025-07-11 13:28:52 -04:00
util.go