Skip to content

Commit a335eb6

Browse files
avoid ly_tzset_once in ly_time_time2str
It does not seem necessary to call ly_tzset_once() from ly_time_time2str(). If the user changes TZ env variable, they must explicitly call tzset() as well.
1 parent 3fea1af commit a335eb6

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/tree_data_common.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,9 +1791,6 @@ ly_time_time2str(time_t time, const char *fractions_s, char **str)
17911791

17921792
LY_CHECK_ARG_RET(NULL, str, LY_EINVAL);
17931793

1794-
/* init timezone */
1795-
ly_tzset_once();
1796-
17971794
/* convert */
17981795
if (!localtime_r(&time, &tm)) {
17991796
return LY_ESYS;

0 commit comments

Comments
 (0)