Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Re: 24 or 6 To Four
There is a international standard for such matters when run on *.nix and Windows.
toggle quoted message
Show quoted text
Now I have forgotten exactly for Windows but for Linux it is the Locate defaults set for the system in use and here for me and in the UK it is : -- LANG=en_GB.UTF-8 LANGUAGE=en_GB LC_ADDRESS=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8 LC_CTYPE=en_GB.UTF-8 LC_IDENTIFICATION=en_GB.UTF-8 LC_MEASUREMENT=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 LC_MONETARY=en_GB.UTF-8 LC_NAME=en_GB.UTF-8 LC_NUMERIC=en_GB.UTF-8 LC_PAPER=en_GB.UTF-8 LC_SOURCED=1 LC_TELEPHONE=en_GB.UTF-8 LC_TIME=en_GB.UTF-8 -- Many of these are hardly original, but you should get the point. Many of my programs that need such written? in Cobol have the following In working storage: *> ?01? WS-Locale?????????????????????????? pic x(16)???? value spaces. ?01? WS-Local-Time-Zone????????????????? pic 9???????? value 3. *> *> Sets WS-Local-Time-Zone ^~^ to one of these 88 value's according to your local requirements *> NOTE Environment var. LC_TIME is checked for "en_GB" for UK (1) and "en_US" for USA (2) *>?? at start of program. For any other, you can add yours if different but let the author know, *>???? so it can be added to the master sources *> *>??? Note that 'implies' does NOT mean the program does anything e.g., changes page sizing in the report. *> ???? 88? LTZ-Unix????????????????????????????????????? value 3. ???? 88? LTZ-USA?????????????????????????????????????? value 2. ???? 88? LTZ-UK??????????????????????????????????????? value 1. In procedure division it is : ???? accept?? WS-Locale???? from Environment "LC_TIME". ???? if?????? WS-Locale (1:5) = "en_GB" ????????????? set LTZ-UK? to true ???? else if? WS-Locale (1:5) = "en_US" ????????????? set LTZ-USA to true ???? end-if. Where the date needs to be processed and usually for reports/printing etc I just do a if test on WS-Local-Time-Zone?? for the values 1, 2 and 3 (as default) and change the formatting accordingly. The above form of coding is also used for other Languages one way or another. I like to keep to the KISS principal as much as possible as it has served well over the last 60 years of programming, testing, management et al. The kit has changed but not much else really. Mainframe is a similar nature but not the same, as it takes the settings from within the O/S as set by a sysadmin and it is the same for all users but say for Linux can be changed for individual users for specific purposes while running an application after which it goes back to the site default. The only light relief is with time as then it depends on, if I am using Local time or GMT, i.e., aviation applications use GMT for all and say accounting and most others? it is all Local. Again for m/f's, this setting is totally down to the site and often is local BUT if it is an international company where the data is moved between countries it is usually GMT - This can be different for some businesses depending on requirements, so not a totally hard and fast rule. Note the same applies to sites using micro based systems. Hope it helps and if I am trying to teach you to suck eggs, just ignore this missive. Vince On 30/07/2022 14:45, Patrik Schindler wrote:
Hello Vince |
to navigate to use esc to dismiss