Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COBOL Local time converter

Status
Not open for further replies.

Jeffreed44

Programmer
Jun 23, 2010
1
US
I have a central data center with stores all over the country. Does anyone know how I can get the system time from the central machine and convert it to the time of the different stores across the country?
 
We face the same issue. HQ/data center on the East coast w/ locations across the country. Application programs adjust time based on location of user running the program. So user's in Central time zone are -1 off of EST/EDT, Mountain time zone -2 and Pacific time zone -3. Fortunately, we don't have users in AZ or IL/IN (I can never remember which one) which have local variations of the standard time zones.

If your apps run in different locations or your users connect to multiple locations you will have a bigger issue trying to determine the time offset.

Code what you mean,
and mean what you code!
But by all means post your code!

Razalas
 
Hi Jeff,
Cobol LE has some useful date/time handling subroutines built in. Have a look at the Language Environment manual here

The one that might be of interest is CEEGMTO which will tell you the difference between GMT and local time.

I have a feeling that this is not going to be of use to you as I think that you have a central machine used by various users located all over the country. The usual way to do this is to have a subroutine that is passed a location and gives back the time or offset. The values of each offset for each location can be held in a data file or a database.

To be honest, this sort of thing is quite common and it may well be that a subroutine has already been written at your installation. Ask around, you may get lucky!

Regards,
Marc

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top