lua-users home
lua-l archive

Re: Posix Lua VM and os timezone update bug

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> As 'localtime_r' is preferred, because it is thread safe, then if some
> application needs awareness of timezone changes, it should use external
> library like
> http://luaposix.github.io/luaposix/docs/modules/posix.html#localtime
> 
> Thank you for clarifying that.
If you want, you can configure your Lua version to call tzset by adding
the following definitions at the end of luaconf.h (or in your makefile):
 #define l_gmtime(t,r)		gmtime_r(t,r)
 #define l_localtime(t,r)	(tzset(), localtime_r(t,r))
-- Roberto

AltStyle によって変換されたページ (->オリジナル) /