× 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.



Ooh! awesome. Thanks Scott!

On Wed, Apr 10, 2013 at 5:22 PM, Scott Klement
<midrange-l@xxxxxxxxxxxxxxxx> wrote:
The QWCCVTDT API should allow you to convert between any two arbitrary time
zones. So you shouldn't need to figure out UTC offsets and all of that, it
should do all of the work for you.

Not sure how to get a list of time zones, though. Maybe just get a list of
*TIMZON objects?



On 4/10/2013 4:09 PM, rick baird wrote:

hey all,

I'm writing a service program where I will convert local time to
another time zone - or vise versa and return it. Basically, I need to
know what time it is somewhere else (a predefined remote location), or
what time it is locally based on a time in another time zone. Yes,
this will include areas that do not observe daylight savings time.

I will store the time zone for each individual remote location in a
file and retrieve the local time zone from system value QTIMZON. Once
I do that, I can do the time math, provided I know the UTC offset.

My questions are these:

Is there an api I can use (V5R4 and lower) to retrieve the list of
valid time zones listed in the WRKTIMZON?

Can I somehow retrieve the UTC offset for a particular time zone?
According to the help, this offset does not self adjust for daylight
savings time, so are the dates the time zone springs forward and back
stored somewhere? How does the operating system know how to spring
forward and back? Is that only stored for local time, or by time zone?

I'm hoping to not have to store the time zones, offsets and DST dates
myself if I can help it, but if that's the best way to go, then I need
to get started on that.

Thanks!

Rick



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.