Skip to content
Snippets Groups Projects
Commit 3e1d3ebf authored by Nicolas George's avatar Nicolas George
Browse files

parseutils: replace setenv() by putenv().

putenv() seems to be more portable.
parent dcfc12e8
No related branches found
No related tags found
No related merge requests found
...@@ -789,6 +789,7 @@ int main(void) ...@@ -789,6 +789,7 @@ int main(void)
int64_t tv; int64_t tv;
time_t tvi; time_t tvi;
struct tm *tm; struct tm *tm;
static char tzstr[] = "TZ=CET-1";
const char *time_string[] = { const char *time_string[] = {
"now", "now",
"12:35:46", "12:35:46",
...@@ -804,7 +805,7 @@ int main(void) ...@@ -804,7 +805,7 @@ int main(void)
}; };
av_log_set_level(AV_LOG_DEBUG); av_log_set_level(AV_LOG_DEBUG);
setenv("TZ", "CET-1", 1); putenv(tzstr);
printf("(now is 2012-03-17 09:14:13 +0100, local time is UTC+1)\n"); printf("(now is 2012-03-17 09:14:13 +0100, local time is UTC+1)\n");
for (i = 0; i < FF_ARRAY_ELEMS(time_string); i++) { for (i = 0; i < FF_ARRAY_ELEMS(time_string); i++) {
printf("%-24s -> ", time_string[i]); printf("%-24s -> ", time_string[i]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment