lekha,
Firstly apr_time_exp_lt() is just a wrapper around
the
native UNIX (aix) calls, and is therefore subject to
all of UNIX's limitations.
The problem is that UNIX has a know date limit which is
Tue, 19 Jan
2038 03:14:07 GMT
The reason for this is that a time_t is a 32 bit signed
number.
The maximum positive value that can be represented in one
is
2147483647.
The reason you have a problem and others don't is
your timezone. To convert to local time, you have to
add your timezone offset (or in my case subtract
my
timezone offset) from GMT. (This is what
localtime
does.)
You are 5 hours ahead of GMT, so you would
add (5 * 60 * 60) 18,000 seconds to the time_t
variable...
thereby overflowing it...
Its hex contents become: 0x8000464f which is
-2147465649....
-tony
From: Lekha Menon [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 12:18 AM To: dev@httpd.apache.org Subject: Re: Problem with apr_time_exp_lt (localtime_r) on AIX Sorry.The test program worked fine.
However, call to API apr_time_exp_lt () fails. It returns year1
with 2147483647000000.
When iput is 2147000000000000, it returns
year as 138. My local time zone setting is PAKST (GMT +5).
Is this causing the problem?
Thanks & Regards,
Lekha Menon Extn - 5329 ----- Original Message -----
http://www.patni.com World-Wide Partnerships. World-Class Solutions. _____________________________________________________________________ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _____________________________________________________________________ |