- Tue Apr 03, 2018 8:19 pm
#75130
schufti wrote:Code: Select all setenv("TZ", "CET-1CEST,M3.5.0,M10.5.0/3", 3); // this sets TZ to Brussels/Paris/Vienna // 2)
I had found this in Arduino/tools/sdk/libc/xtensa-lx106-elf/include/stdlib.h
setenv,(const char *__string, const char *__value, int __overwrite)
and then this elsewhere.
Description:
The setenv() function sets the environment variable name to value. If name doesn't exist in the environment, it's created; if name exists and overwrite is nonzero, the variable's old value is overwritten with value; otherwise, it isn't changed.
So does 3 (third parameter) in the example above mean anything? Or is 1, 2, 4, 99 all the same as 3?
In a similar code example I found, and have been using, this
setenv("TZ", "CST6CDT,M3.2.0,M11.1.0",
0);