diff --git a/web/pgadmin/browser/__init__.py b/web/pgadmin/browser/__init__.py index 866d468ca..e9bd381c1 100644 --- a/web/pgadmin/browser/__init__.py +++ b/web/pgadmin/browser/__init__.py @@ -511,17 +511,6 @@ def utils(): except Exception: pg_libpq_version = 0 - # Get the pgadmin server's locale - default_locale = '' - if current_app.PGADMIN_RUNTIME: - import locale - try: - locale_info = locale.getlocale() - if len(locale_info) > 0 and locale_info[0] != 'C': - default_locale = locale_info[0].replace('_', '-') - except Exception: - current_app.logger.debug('Failed to get the default locale.') - for submodule in current_blueprint.submodules: snippets.extend(submodule.jssnippets) @@ -559,7 +548,6 @@ def utils(): qt_default_placeholder=QT_DEFAULT_PLACEHOLDER, vw_edt_default_placeholder=VW_EDT_DEFAULT_PLACEHOLDER, enable_psql=config.ENABLE_PSQL, - pgadmin_server_locale=default_locale, _=gettext, auth_only_internal=auth_only_internal, mfa_enabled=is_mfa_enabled(), diff --git a/web/pgadmin/browser/templates/browser/js/utils.js b/web/pgadmin/browser/templates/browser/js/utils.js index fbb07cfe8..6e4454f73 100644 --- a/web/pgadmin/browser/templates/browser/js/utils.js +++ b/web/pgadmin/browser/templates/browser/js/utils.js @@ -63,9 +63,6 @@ define('pgadmin.browser.utils', pgAdmin['fixed_binary_paths'] = {{ current_app.config.get('FIXED_BINARY_PATHS') }}; - /* GET the pgadmin server's locale */ - pgAdmin['pgadmin_server_locale'] = '{{pgadmin_server_locale}}'; - /* Server Heartbeat Timeout */ pgAdmin['heartbeat_timeout'] = '{{heartbeat_timeout}}'; diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/QueryHistory.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/QueryHistory.jsx index a8333916d..6a51f09ed 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/sections/QueryHistory.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/QueryHistory.jsx @@ -117,14 +117,10 @@ export const QuerySources = { }; function getDateFormatted(date) { - if (pgAdmin['pgadmin_server_locale'] !== '') - return date.toLocaleDateString(pgAdmin['pgadmin_server_locale']); return date.toLocaleDateString(); } function getTimeFormatted(time) { - if (pgAdmin['pgadmin_server_locale'] !== '') - return time.toLocaleTimeString(pgAdmin['pgadmin_server_locale']); return time.toLocaleTimeString(); }