Data entry APP error:RangeError: Invalid time zone specified: GMT+08:00

when I open 2.40 's dhis-web-aggregate-data-entry data entry app,got this error:

RangeError: Invalid time zone specified: GMT+08:00
RangeError: Invalid time zone specified: GMT+08:00

Using the Data Administration app in Maintenance, please select Clear application cache and reload apps. After that is cleared, open the app again using your browser’s Guest mode. If the issue doesn’t happen again then please clear your cache.

If the issue happens again in Guest mode please take a screenshot of the Network tab in your DevTools F12, and we might need to request the Catalina.out log (without sensitive info)

Thanks!

I have done work as you said, still got this error,no info in Catalina.out

RangeError: Invalid time zone specified: GMT+08:00
RangeError: Invalid time zone specified: GMT+08:00
at Date.toLocaleString ()
at http://100.64.0.1:10009/dhis-web-aggregate-data-entry/static/js/app.47d2c000.chunk.js:1:8397
at Object.useMemo (http://100.64.0.1:10009/dhis-web-aggregate-data-entry/static/js/main.5b22e0fa.js:2:285781)
at t.useMemo (http://100.64.0.1:10009/dhis-web-aggregate-data-entry/static/js/main.5b22e0fa.js:2:389061)
at http://100.64.0.1:10009/dhis-web-aggregate-data-entry/static/js/app.47d2c000.chunk.js:1:8373
at ye (http://100.64.0.1:10009/dhis-web-aggregate-data-entry/static/js/app.47d2c000.chunk.js:1:8483)
at http://100.64.0.1:10009/dhis-web-aggregate-data-entry/static/js/app.47d2c000.chunk.js:1:11595
at Ce (http://100.64.0.1:10009/dhis-web-aggregate-data-entry/static/js/app.47d2c000.chunk.js:1:11789)
at sr (http://100.64.0.1:10009/dhis-web-aggregate-data-entry/static/js/app.47d2c000.chunk.js:1:380040)
at ea (http://100.64.0.1:10009/dhis-web-aggre

1 Like

Thanks, @linxd. Sorry that you’re having trouble with the data entry app.

Could you check the api/system/info of your instance and let us know what the value for serverTimeZoneId is?

My guess is that the format of the serverTimeZoneId is invalid and that this is then causing problems in the data entry app.

When we know the value of your serverTimeZoneId, we can determine if this is something we need to fix in the back end code (how the serverTimeZoneId value is generated), in the front end code (the the data entry app error), or both.

1 Like

{“contextPath”:“http://100.64.0.1:10009”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36”,“calendar”:“iso8601”,“dateFormat”:“yyyy-mm-dd”,“serverDate”:“2023-05-30T16:03:49.600”,“serverTimeZoneId”:“GMT+08:00”,“serverTimeZoneDisplayName”:“GMT+08:00”,“lastAnalyticsTableSuccess”:“2023-05-17T09:51:57.079”,“intervalSinceLastAnalyticsTableSuccess”:“318 h, 11 m, 52 s”,“lastAnalyticsTableRuntime”:“00:01:37.198”,“version”:“2.40.1-SNAPSHOT”,“revision”:“c877443”,“buildTime”:“2023-05-29T16:39:36.000”,“jasperReportsVersion”:“6.20.5”,“environmentVariable”:“DHIS2_HOME”,“fileStoreProvider”:“filesystem”,“readOnlyMode”:“off”,“nodeId”:“”,“javaVersion”:“11.0.14”,“javaVendor”:“Oracle Corporation”,“osName”:“Linux”,“osArchitecture”:“amd64”,“osVersion”:“5.19.0-1.el7.elrepo.x86_64”,“externalDirectory”:“/data/dhis/conf”,“databaseInfo”:{“name”:“dhis240”,“user”:“dhis”,“url”:“jdbc:postgresql://172.18.87.238:5438/dhis240”,“databaseVersion”:“PostgreSQL 11.19”,“spatialSupport”:true},“readReplicaCount”:0,“memoryInfo”:“Mem Total in JVM: 4000 Free in JVM: 3005 Max Limit: 7000”,“cpuCores”:8,“encryption”:false,“emailConfigured”:false,“redisEnabled”:false,“systemId”:“6f6ffce1-ad8a-491c-be03-f46abe696c53”,“systemName”:“xxxxxxxxxxxx”,“clusterHostname”:“”,“isMetadataVersionEnabled”:false}

1 Like

Thanks @linxd. The serverTimeZoneId I would expect for this time zone would be Etc/GMT+8.

I will follow up with some of my colleagues to see how we can fix this.

Thanks for letting us know about this issue.

1 Like

No thanks. Thanks for your best work!

1 Like

Thank you @tzemp and @linxd ! Are we creating a Jira bug issue for this? @linxd would you like to create one with your account and share it here: Projects - Jira

Thanks! :slight_smile:

A ticket has been created: DHIS2-15361

We’re discussing how to best address it and if there are work arounds in the meantime.

2 Likes

Hi @linxd. Sorry for the delay in replying. We looked into this issue some more:

The time zone you are using (GMT+08:00) isn’t a standard time zone for Java or JavaScript. However, Java does allow you to define your own time zone in this format. We will update the data entry app to not error out if you have defined a custom time zone.

This wasn’t a case we imagined, so thank you for reporting. If you want to use the data entry app before we make the fix and if you can set your instance time zone, you can change the time zone to a standard one in Java (e.g. java -Duser.timezone=Asia/Chongqing) and then the app should work again.

1 Like

THanks.
now is : I think its right ?
Local time: 二 2023-06-27 09:07:49 CST
Universal time: 二 2023-06-27 01:07:49 UTC
RTC time: 二 2023-06-27 01:07:49
Time zone: Asia/Shanghai (CST, +0800)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a

1 Like

That looks good @linxd . What value do you now get for serverTimeZoneId from api/system/info? Does the data entry app work for you now?

(note: we have also opened a PR to fix this issue in the data entry app, but it may take some time before we merge and release that)

1 Like

Thanks. it’s working now

Thanks @linxd would you please share the solution that helped you and mark as solved? Thanks!

Hi @tzemp and @Gassim

I believe this jira ticket to be reviewed as well [DHIS2-12218] - Jira

It has connection to the servers time difference.

Thank you

1 Like

Hi @Ulanbek. Thank you for reporting that issue; the issue on that ticket is a bit different than the issue in this thread (this thread reports a problem faced when using time zones that are not in the IANA time zone database), but the tracker team is aware of the bug you reported, and the ticket is in “to do” status.

1 Like