[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: os.date('*t') doesn't report tm_gmtoff field
- From: Alexander Gladysh <agladysh@...>
- Date: Tue, 28 Feb 2012 14:16:23 +0400
On Tue, Feb 28, 2012 at 10:11, Vladimir Dronnikov <dronnikov@gmail.com> wrote:
> I wonder what are the reasons `os.date('*t')` doesn't report `tm_gmtoff` field?
> Are they only that the latter is glibc extension?
Yup, not a standard.
http://www.delorie.com/gnu/docs/glibc/libc_435.html
long int tm_gmtoff
This field describes the time zone that was used to compute this
broken-down time value, including any adjustment for daylight saving;
it is the number of seconds that you must add to UTC to get local
time. You can also think of this as the number of seconds east of UTC.
For example, for U.S. Eastern Standard Time, the value is -5*60*60.
The tm_gmtoff field is derived from BSD and is a GNU library
extension; it is not visible in a strict ISO C environment.
Alexander.