Discussion
DXC
IN
Last activity: 3 Mar 2016 8:10 EST
how to show one date time field in CST to all users from different timezones
We have a requirement to show one date time field only in CST to all users who log into the application.
Appreciate ideas on achieving this.
Regards,
Nagendra
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
The easiest way is to set all users Time zone to CST
Hawaii Medical Service Association
US
is there a way to set default time zone to cst in place of est for all user rather than doing it manually to each of them?
Pegasystems Inc.
US
User time zone is stored on Operator records in the "Work" tab.
In sounds like you want to set the time zone to "America/Chicago" for all Operators.
CST means standard time but in the summer this would be CDT, daylight time, hence the need to specify a time zone and let Java decide whether it is CST/CDT.
If external authentication is used, whenever someone logs in a new Operator record is "cloned" from a OrgUnit-related "model" Operator then updated with information from the external source.
You could set the pyDefaultTimeZone to "America/Chicago" on all OrgUnit model Operator records.
See: Code-Security AuthenticationLDAPVerifyCredentials
If using OOTB Pega internal authentication, which is not recommended for Production, you could write an Activity to change pyDefaultTimeZone for every Operator record as opposed to doing this manually.
FYI: According to Help, users can temporarily change their own locale;
8>< - - - - - - - - ><8
User time zone is stored on Operator records in the "Work" tab.
In sounds like you want to set the time zone to "America/Chicago" for all Operators.
CST means standard time but in the summer this would be CDT, daylight time, hence the need to specify a time zone and let Java decide whether it is CST/CDT.
If external authentication is used, whenever someone logs in a new Operator record is "cloned" from a OrgUnit-related "model" Operator then updated with information from the external source.
You could set the pyDefaultTimeZone to "America/Chicago" on all OrgUnit model Operator records.
See: Code-Security AuthenticationLDAPVerifyCredentials
If using OOTB Pega internal authentication, which is not recommended for Production, you could write an Activity to change pyDefaultTimeZone for every Operator record as opposed to doing this manually.
FYI: According to Help, users can temporarily change their own locale;
8>< - - - - - - - - ><8
When you sign on, Pega 7 Platform uses the time zone and output locale setting in Operator ID data instance as default values. Use this tool to set temporary values for your current time zone and currency, to control the display of numbers and dates, and to control the dictionary used for spellchecking.
Changing the locale for your current session
To change the locale for the current session, you need to override some locale settings.
-
Select Designer Studio>User Interface > Localization Tools > Locale Settings
-
If desired, click Settings to review current locale settings.
-
Complete the panel.
-
Click Update.
-
Close the window.
Bernving Associated
NL
Ah, Time Zones and Java is a delicate issue. Certainly when you need historical date and time values as for trading prices etc. Riyadh had a time zone difference with GMT of 3.07 minutes between 1985 and 1988 if I remember correctly. And you need to take Summer and Winter time issues into account. Java standard libraries are not that good at handling this and what you need to do is to import and use some time library like Joda time etc. Keep in mind Java does a lot of automagic things when it comes to display date and times. Most of it is about transforming to the time zone of the current viewer on that moment. You might need to do a lot of calculation to actually show a date and time as a different time zone to the current users as a time in the past. I suggest you create a special control for this if the previous suggestions, from other people, are not enough.
Anyhow this is a question that goes beyond any of our courses in Pega Academy and I suggest you to put this question in one of our product forums.