Setting tm_gmtoff "fixes" it. Should I call mktime before
passing tm struct into strftime? Or assumption here is
"garbage in - garbage out"?
It was unexpected to me and it is not clear from man pages.
Also, as strftime has no way of indicating error [1], is
there any downside of "doing the right thing" (tm) and
instead of using user provided tm_gmtoff get it from mktime
call?
Yep, there is tm_gmtoff in MacOs. Moreover, its strftime
implementation ignores any garbage value stored there
and puts the correct value into the passed array.