[BUG] RemoteConfig unit tests fail in non-English (e.g., Korean) Locales due to Date Parsing
@rathovarun1032 đang làm issue này rồi.
Từ ngày 15/3/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
[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.
- Ngôn ngữ chính
- Java
- Star
- 620
- Fork
- 305
- Merge trung bình
- 4 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 4
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của firebase/firebase-admin-java
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
firebase/firebase-admin-java#1231 ·
-
api: core
firebase/firebase-admin-java#1198 · 3 bình luận · 1 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
firebase/firebase-admin-java#1192 · 3 bình luận ·
-
needs-triage type: feature request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
firebase/firebase-admin-java#1149 · 1 bình luận ·
-
needs-triage type: feature request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
firebase/firebase-admin-java#1142 · 2 bình luận ·
Tất cả issue của firebase/firebase-admin-java
Issue tương tự
-
certification
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Đang mởbug ecr
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Needs: Triage Type: Feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
github/copilot-sdk#2760 ·