This is an automated email from the ASF dual-hosted git repository.
janhoy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new da3ba55d080 Admin UI: accept offset time zones such as GMT+05:00 on
the replication screen (#5318)
da3ba55d080 is described below
commit da3ba55d08057bc8c698c2f596e5a05eddb1589d
Author: Jan Høydahl <[email protected]>
AuthorDate: Tue Nov 10 22:46:57 2026 +0100
Admin UI: accept offset time zones such as GMT+05:00 on the replication
screen (#5318)
---
.../PR#5318-adminui-replication-offset-timezones.yml | 10 ++++++++++
solr/webapp/web/js/angular/controllers/replication.js | 3 ++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git
a/changelog/unreleased/PR#5318-adminui-replication-offset-timezones.yml
b/changelog/unreleased/PR#5318-adminui-replication-offset-timezones.yml
new file mode 100644
index 00000000000..2b8253a49a6
--- /dev/null
+++ b/changelog/unreleased/PR#5318-adminui-replication-offset-timezones.yml
@@ -0,0 +1,10 @@
+title: >
+ The Admin UI replication screen no longer fails with a JavaScript TypeError
when the server
+ runs in a time zone without an abbreviation, such as Etc/GMT-5, which Java
renders as GMT+05:00.
+type: fixed
+authors:
+ - name: Jan Høydahl
+ nick: janhoy
+links:
+ - name: PR#5318
+ url: https://github.com/apache/solr/pull/5318
diff --git a/solr/webapp/web/js/angular/controllers/replication.js
b/solr/webapp/web/js/angular/controllers/replication.js
index 393d9d8506e..a065e1ecb53 100644
--- a/solr/webapp/web/js/angular/controllers/replication.js
+++ b/solr/webapp/web/js/angular/controllers/replication.js
@@ -186,7 +186,8 @@ var getFollowerVersions = function(data) {
var parseDateToEpoch = function(date) {
// ["Sat Mar 03 11:00:00 CET 2012", "Sat", "Mar", "03", "11:00:00", "CET",
"2012"]
- var parts = date.match(
/^(\w+)\s+(\w+)\s+(\d+)\s+(\d+\:\d+\:\d+)\s+(\w+)\s+(\d+)$/ );
+ // The zone may also be an offset such as "GMT+05:00", so it must not be
restricted to \w+
+ var parts = date.match(
/^(\w+)\s+(\w+)\s+(\d+)\s+(\d+\:\d+\:\d+)\s+(\S+)\s+(\d+)$/ );
// "Sat Mar 03 2012 10:37:33"
var d = new Date( parts[1] + ' ' + parts[2] + ' ' + parts[3] + ' ' +
parts[6] + ' ' + parts[4] );