1
0
Fork 0
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:
Frédéric Guillot 2018-02-04 14:37:42 -08:00
parent 61bc012a62
commit b5b1930599
16 changed files with 91 additions and 58 deletions

View file

@ -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)
}
}
}