mirror of
https://github.com/miniflux/v2.git
synced 2025-07-22 17:18:37 +00:00
Take timezone into consideration when calculating relative time
This commit is contained in:
parent
61bc012a62
commit
b5b1930599
16 changed files with 91 additions and 58 deletions
|
@ -31,8 +31,8 @@ func TestElapsedTime(t *testing.T) {
|
|||
{time.Now().Add(-time.Hour * 24 * 365 * 3), fmt.Sprintf(Years, 3)},
|
||||
}
|
||||
for i, tt := range dt {
|
||||
if out := ElapsedTime(&locale.Language{}, tt.in); out != tt.out {
|
||||
t.Errorf("%d. content mismatch for %v:exp=%q got=%q", i, tt.in, tt.out, out)
|
||||
if out := ElapsedTime(&locale.Language{}, "Local", tt.in); out != tt.out {
|
||||
t.Errorf(`%d. content mismatch for "%v": expected=%q got=%q`, i, tt.in, tt.out, out)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue