lua-users home
lua-l archive

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


Dont rely on "%z" giving a number (or anything else) in Win32.

This only returns a value if you have performed os.setlocale() and
on my box both %z and %Z return a string like
"Eastern Standard Time"


On Sat, 12 Mar 2005 10:22:48 -0300, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
> > Is there a way to access time zone information from Lua? Perhaps the
> > time zone name and its UTC offset?
> 
>  =os.date"%z"
>  -0300
>  =os.date"%Z"
>  BRT
> 
> but %z is a GNU extension.
> --lhf
>