parser/tests: allow for DST change
e.g. 21d / 2w are subject to DST; update the tolerance.
This commit is contained in:
@ -86,8 +86,8 @@ test_date_ymwdhMs (void)
|
|||||||
int tolerance;
|
int tolerance;
|
||||||
} tests[] = {
|
} tests[] = {
|
||||||
{ "3h", 3 * 60 * 60, 1 },
|
{ "3h", 3 * 60 * 60, 1 },
|
||||||
{ "21d", 21 * 24 * 60 * 60, 1 },
|
{ "21d", 21 * 24 * 60 * 60, 3600 + 1 },
|
||||||
{ "2w", 2 * 7 * 24 * 60 * 60, 1 },
|
{ "2w", 2 * 7 * 24 * 60 * 60, 3600 + 1 },
|
||||||
|
|
||||||
{ "2y", 2 * 365 * 24 * 60 * 60, 24 * 3600 + 1 },
|
{ "2y", 2 * 365 * 24 * 60 * 60, 24 * 3600 + 1 },
|
||||||
{ "3m", 3 * 30 * 24 * 60 * 60, 3 * 24 * 3600 + 1 }
|
{ "3m", 3 * 30 * 24 * 60 * 60, 3 * 24 * 3600 + 1 }
|
||||||
@ -154,8 +154,6 @@ test_format ()
|
|||||||
"hello world, 123");
|
"hello world, 123");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user