[BUG] RemoteConfig unit tests fail in non-English (e.g., Korean) Locales due to Date Parsing
@rathovarun1032 is already working on this.
Since Mar 15, 2026.
Assessment
This issue has not been assessed yet.
Description
[REQUIRED] Step 2: Describe your environment
- Operating System version: macOS (Apple Silicon, ko_KR locale)
- Firebase SDK version: 9.7.0 (Current development branch)
- Library version: N/A
- Firebase Product: Remote Config
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
The unit tests for Remote Config fail when the system's default locale is set to a non-English language (e.g., Korean). This is due to RemoteConfigUtil using SimpleDateFormat without an explicit Locale.ENGLISH, causing parsing errors or string comparison mismatches against English date formats.
Error Output:
org.junit.ComparisonFailure: expected:<...NODE","updateTime":"[Tue, 08 Dec] 2020 15:49:51 UTC",...>
but was:<...NODE","updateTime":"[화, 08 12월] 2020 15:49:51 UTC",...>
Caused by: java.text.ParseException: Unparseable date: "Tue, 08 Dec 2020 15:49:51 UTC"
at java.base/java.text.DateFormat.parse(DateFormat.java:427)
at com.google.firebase.remoteconfig.RemoteConfigUtil.convertFromUtcDateFormat(RemoteConfigUtil.java:91)
Relevant Code:
The issue occurs in RemoteConfigUtil.java. There are 4 methods using SimpleDateFormat without an explicit Locale. To ensure consistent behavior across different system locales, all instances of SimpleDateFormat should be instantiated with Locale.ENGLISH.
Affected Methods:
convertToUtcZuluFormat(long millis)convertToUtcDateFormat(long millis)convertFromUtcZuluFormat(String dateString)convertFromUtcDateFormat(String dateString)
Current implementation:
SimpleDateFormat dateFormat = new SimpleDateFormat(PATTERN);
Recommended fix:
SimpleDateFormat dateFormat = new SimpleDateFormat(PATTERN, Locale.ENGLISH);
I've already identified the fix and verified it locally by setting the locale to Korean. I'd like to submit a Pull Request to resolve this issue.
- Dominant language
- Java
- Stars
- 620
- Forks
- 305
- Avg merge
- 3h 23m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/firebase-admin-java
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
firebase/firebase-admin-java#1231 ·
-
api: core
firebase/firebase-admin-java#1198 · 3 comments · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
firebase/firebase-admin-java#1192 · 3 comments ·
-
needs-triage type: feature request
Difficulty 3/5 1-2 days Newbie friendliness 45/100
firebase/firebase-admin-java#1149 · 1 comment ·
-
needs-triage type: feature request
Difficulty 5/5 Over a week Newbie friendliness 45/100
firebase/firebase-admin-java#1142 · 2 comments ·
All issues in firebase/firebase-admin-java
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100