Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
prolinkdata_gr Trusted Contributor.
Trusted Contributor.
2230 views

Date format issues

Jump to solution

Hi all,

I have a program running through AcuConnect. There are AcuThin clients running from PCs with different regional settings.

Regarding reporting, how can automatically adjust the displayed Date control with the appropriate format? (dd/mm/yyyy for Europe clients, mm/dd/yyyy for America clients).

Bonus question: when running "ACCEPT my-var FROM DATE" from AcuThin client, my-var has the clent's date or the server's date? Is there a way to have a UTC/GMT date/time information through a function? 

Thank you

Th.

 

0 Likes
2 Solutions

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

RE: Date format issues

Jump to solution

I do not know of a way to automatically adjust the displayed Date control with the appropriate format. I think you'll need to set up 2 different control, both invisible and then turn the appropriate one visible based on the user (or user preferences).  "ACCEPT my-var FROM DATE" from AcuThin client, my-var has the server's date, as the program is actually executing on the server, the display occurs on the client. You can access client side programs like dlls using this type of syntax CALL "@[DISPLAY]:MYLIB.DLL". I do not believe there is a function that we provide that provides UTC/GMT. There are probably a few web services or maybe some ActiveX controls that provide that functionality.

View solution in original post

0 Likes
DougP Outstanding Contributor.
Outstanding Contributor.

RE: Date format issues

Jump to solution

The following KB article has a program attached called timezone.cbl.  

community.microfocus.com/.../17351.determine-the-time-zone-in-an-acucobol-gt-program-running-on-windows.aspx

It uses the GetTimeZonInformation method of kernel32.dll to obtain the machine's time zone.  In a Thin  Client implementation add the following runtime configuration settings to get the client time zone:

CODE_MAPPING ON

DLL_CONVENTION 1

KERNEL32.dll @[DISPLAY]:C:\Windows\syswow64\KERNEL32.dll

GetTimeZoneInformation @[DISPLAY]:GetTimeZoneInformation

View solution in original post

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

RE: Date format issues

Jump to solution

I do not know of a way to automatically adjust the displayed Date control with the appropriate format. I think you'll need to set up 2 different control, both invisible and then turn the appropriate one visible based on the user (or user preferences).  "ACCEPT my-var FROM DATE" from AcuThin client, my-var has the server's date, as the program is actually executing on the server, the display occurs on the client. You can access client side programs like dlls using this type of syntax CALL "@[DISPLAY]:MYLIB.DLL". I do not believe there is a function that we provide that provides UTC/GMT. There are probably a few web services or maybe some ActiveX controls that provide that functionality.

View solution in original post

0 Likes
ianb Absent Member.
Absent Member.

RE: Date format issues

Jump to solution

Regarding the Bonus Question:-

We have a similar situation where a server in one time zone is supporting users and databases in multiple time-zones.

Support for different time-zones is provided to our app by the operating system.  When a user connects, their identity on the AcuConnect server defines the time-zone they are in, and then ACCEPT FROM TIME returns the appropriate time for the user.

Our server is running Linux, but I would assume Windows should be capable of the same approach.

0 Likes
DougP Outstanding Contributor.
Outstanding Contributor.

RE: Date format issues

Jump to solution

The following KB article has a program attached called timezone.cbl.  

community.microfocus.com/.../17351.determine-the-time-zone-in-an-acucobol-gt-program-running-on-windows.aspx

It uses the GetTimeZonInformation method of kernel32.dll to obtain the machine's time zone.  In a Thin  Client implementation add the following runtime configuration settings to get the client time zone:

CODE_MAPPING ON

DLL_CONVENTION 1

KERNEL32.dll @[DISPLAY]:C:\Windows\syswow64\KERNEL32.dll

GetTimeZoneInformation @[DISPLAY]:GetTimeZoneInformation

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.