The locale and timezone of the OpenSpecimen server impact how OpenSpecimen works. Especially in case of date formats and display.
OpenSpecimen displays the date format based on the server's locale setting. E.g., If the server is installed in the US time zone, the date format would be MM/DD/YYYY, whereas if the server is installed in China timezone, the date format would be YYYY/MM/DD. This is typically present in the machine, and you do not have to do any extra steps.
It is also possible to change the timezone for the server through the OpenSpecimen's Settings tab. For that, go to Home-> Settings-> Search for ‘Locale’ -> Enter a new value for the ‘Locale’ and update. For abbreviations for other locales, refer to - https://www.science.co.il/language/Locale-codes.php
This is important in multi-site studies where users are across multiple timezones.
The date and time for data entry are displayed based on the timezone of the user. E.g., a multi-site study is going across India and USA. When the user from India does data entry at 4.40 pm on 16 Nov 2018, the user from the USA site will see it as 5.10 am, 16 Nov 2018.
The data in the database is stored in the VM's timezone.
OpenSpecimen's default timezone is the same as the operating system / VM. However, OpenSpecimen's default timezone can be altered by setting the JVM property user. Timezone at the startup. The example given below ensures OpenSpecimen uses MST (Mountain standard time):
-Duser.timezone=US/Mountain
Add the above option to the JAVA_OPTS variable found in setenv.sh or service.bat residing in the $TOMCAT_HOME/bin directory. For details, refer to the Tomcat documentation.
The list of timezones is documented here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
When users are doing bulk import and they do not want the date & time to get converted based on their timezone, it can be changed in user profile.
Steps:
3. Select the timezone in the 'Time Zone' field and update the user details.
Note: The user edit access is limited to some users. It is dependant on the role of the user. For more details about the access, refer to the Roles and Privileges page.