× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Scott Klement wrote:

On Wed, 29 Oct 2003, James Rich wrote:


Notice "on some architectures".  Most likely is that the timezone
structure is not filled out on the iSeries platform.  If so, this is not
a bug.


Do you know for a fact that this is the reason, or is it just a guess?
When I look in the iSeries Information Center, I see this:

This was admittedly a guess. That's why I said "most likely". I guessed that simply because other architectures do the same. I apologize for being misleading (and for not doing my homework as thoroughly as you did! Good work!).


It says NOTHING about the time zone not being filled in, despite that this
is an iSeries-specific manual.   In fact, there's an example at the end of
this page which shows output like this:

   Example Output:
   gettimeofday() successful.
   time = 866208142.290944, minuteswest = 360, dsttime = 1

Why would IBM put an example in their own iSeries manual that shows the
timezone being returned if they don't support it?

Something isn't right here.  Either their documentation is really really
misleading, or something else is wrong, here..

I guess this is the crux of it. What you got for the output of your sample program makes me think the manual is misleading. See below.


No, it's not.  The time returned by gettimeofday() is the seconds from Jan
1 1970, UTC, NOT the local time.  This is documented in the Infocenter as
well, but I also tested it with a quick program...

Absolutely right. Sorry, I said the wrong thing there.


Here's my test program, I deliberately coded this so that it would work
on V4R2 or later (since that's when the API was introduced).  On my
system, it returns the UTC time and 0 for the minutes west.

And isn't that exactly what Loek was saying the problem was, that it keeps saying 0 minutes west? Is the QUTCOFFSET system value on your system non-zero? If so, then gettimeofday() is not following the docs.


I ran your test program and I also got 0 minutes west. But that doesn't tell us anything because QUTCOFFSET is set to 0 on the system I tested.

James Rich

"As for security, being lectured by Microsoft is like receiving wise words on the subject of compassion from Stalin."
-- mormop on lwn.net



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.