Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent
Commits
add7c855
Commit
add7c855
authored
Dec 14, 2016
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make the unit tests for strfTIM independent of (my) local time zone
parent
eda06ca7
Pipeline
#98
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
test_strfTIM.c
src/test/test_strfTIM.c
+7
-3
No files found.
src/test/test_strfTIM.c
View file @
add7c855
...
...
@@ -76,13 +76,13 @@ static char
size_t
n
;
time_t
t
=
1382804827
;
long
usec
=
112625
;
const
char
*
exp
=
"2013-10-26-1
8
:27:07.112625"
;
const
char
*
exp
=
"2013-10-26-1
6
:27:07.112625"
;
char
s
[
BUFSIZ
];
struct
tm
*
tm
;
printf
(
"... testing strfTIM %%i conversion specifier
\n
"
);
tm
=
local
time
(
&
t
);
tm
=
gm
time
(
&
t
);
MAN
(
tm
);
n
=
strfTIM
(
s
,
BUFSIZ
,
"%F-%T.%i"
,
tm
,
usec
);
...
...
@@ -113,12 +113,16 @@ static char
*
test_strfTIMlocal
(
void
)
{
size_t
n
;
time_t
t
=
1382804820
;
struct
tm
*
tm
;
char
s
[
BUFSIZ
],
exp
[
BUFSIZ
];
printf
(
"... testing strfTIMlocal
\n
"
);
n
=
strfTIMlocal
(
s
,
BUFSIZ
,
"%F-%T.%i"
,
1382804820
.
112625
);
sprintf
(
exp
,
"2013-10-26-18:27:0%.6f"
,
0
.
112625
);
tm
=
localtime
(
&
t
);
MAN
(
tm
);
strftime
(
exp
,
BUFSIZ
,
"%F-%T.112625"
,
tm
);
VMASSERT
(
n
==
strlen
(
exp
),
"strfTIMlocal return value %zu (expected %zu)"
,
n
,
strlen
(
exp
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment