Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

First day of the week cannot be set as Monday

SA-49065

Summary




In report definitions, when 'previous week' is selected as a filter criteria, the week starts from Sunday.

User need to change the first day of week to Monday from Sunday.

Following the PDN article in the link below, User changed the default locale of operator to tr_TR but that did not help.

https://pdn.pega.com/community/pega-product-support/question/how-change-start-date-calendar


Error Messages



Not Applicable


Steps to Reproduce

  1. Create a report definition.
  2. Add filter condition.
  3. From Select values button choose previous week.


Root Cause



In the the JVM settings of the application the user.countyry parameter is pointed to a different country.

Thus Java Calendar methods is working as per the locale set in the JVM based on the user.country argument.


Resolution



Make the following change to the operating environment:
The first day of week depends on the user country (-Duser.country jvm argument)
The below report is executed from Pega Designer Studio. In this report the filter criteria is greater than “Previous Week” on a datetime filled.


Below are the SQL query generated for two different JVM settings.

  • Case 1: user country = GB, Monday is the first day of the week.
SMA > Advanced > Web Tier Runtime Environment.



  • Case2: country = US, Sunday is the first day of the week.



In the above report execution for country = GB the report fetches data from 18th December 2017 00:00:000 hours which is Monday and the first date of the week as per the JVM Locale settings.

For the second case that is, country = US the report fetches data from 17th December 2017 00:00:000 hours which is Sunday and the first date of the week as per the jvm Locale settings.

The user country must be set to enforce locale from the JVM level so that Java Calendar methods work accordingly.
The JVM argument is –Duser.country=X. (X = IN, GB, TR, US, and so on)
The language JVM argument is –Duser.language=Y (Y = tr, fr, en, and so on).

Published February 15, 2018 - Updated October 8, 2020

Was this useful?

50% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice