Created On:  08 October 2010


There is a need to have the program determine the time zone where it is running.  How is this done with ACUCOBOL-GT?


While AcuCOBOL-GT has no native ability to determine the timezone it is accomplished fairly easily with a call to the kernel32.dll GetTimeZoneInformation method.  The attached program demonstrates this, and how to parse the result into usable pieces.

Note that if the program is running on a server via AcuConnect Thin Client it is possible to determine the Client PC's timezone with the same method.  It is a simple matter of using the @[display] notation to tell the runtime to call the dll on the client PC.  Complete information about that is found in the AcuConnect user's manual, Section "Calling client-side DLLs."