Good luck on this. At one time, when I was unemployed, I was looking at playing around with this dilemma with the data from:
https://www.iana.org/time-zones
But, I found a job and that was the end of that project...
Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxx> on behalf of txpenguin1@xxxxxxxxxxx <txpenguin1@xxxxxxxxxxx>
Sent: Friday, December 28, 2018 12:22 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Time Zone Computation
All,
Seem to have hit a wall that I hope others have scaled before me and may be
able to help me over.
I have an event that has occurred in a specific city within the US. I know
the date and time of the event. The SOAP service I am working with uses the
"XMLGregorianCalendar Class" for its interface. The format is
"2018-12-28T13:15:05-05:00" where it is CCYY-MM-DD with a 'T' to separate
the date and time, followed by HH:MM:SS followed by a hyphen and then the
HH:MM off-set to GMT. If the off-set was static that would be great, but as
we all know thanks to Daylight Savings Time and Standard Daylight Time the
off-set changes twice each year. However, let us not forget the cities
and/or states where no change is made (like parts of Arizona).
So, my dilemma is this - based upon a specific date and time, in a specific
city/state, how can I compute the number of hours difference to GMT for that
moment?
I'll take anything that I can do within the System i (BTW, we are on O/S 7.2
in case of any release-specific solutions), or an off-platform SOAP/REST
service I can call, only if it is free. You know how those multi-billion
dollar corporations are on letting loose with a nickel for a paid service.
Merry Christmas (belated), Happy New Year (in advance), and Happy Holidays
(in general) to all, and as always, thanks in advance for any assistance.
Steve Meisinger
As an Amazon Associate we earn from qualifying purchases.