Hey Rick,
You can use the Retrieve Time Zone Description (QWCRTVTZ) API to
retrieve a list of all time zones on the system as well as the
associated time zone information:
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/apis/qwcrtvtz.htm
-Carsten
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rick baird
Sent: 10. april 2013 23:09
To: Midrange Systems Technical Discussion
Subject: Converting local time to another time zone
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
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
This communication is intended only for use by the addressee.It may contain confidential or privilegedinformation.
If you receive this communication unintentionally, please inform us immediately and delete this e-mail and any attachments.
Warning: Although we have taken reasonable precautions to ensure no viruses are present in this email, we cannot accept
responsibility for any loss or damage arising from the use of this email or attachments.
As an Amazon Associate we earn from qualifying purchases.