Closed Bug 1710098 Opened 5 years ago Closed 4 years ago

Glean Android uses `SimpleDateFormat` for which there may be a better choice in `DateTimeFormatter`

Categories

(Data Platform and Tools :: Glean: SDK, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: travis_, Assigned: travis_)

Details

According to this stackoverflow comment that I stumbled upon while looking into how we were using dates in the MPS for Android, SimpleDateFormat is not threadsafe and looking at DateTimeFormatter it appears to have a built-in format for ISO strings that looks like we wouldn't have to do the string manipulation with that we do here

Assignee: nobody → tlong
Priority: P3 → P2
Whiteboard: [telemetry:glean-rs:m?]

Fly-by: Note that the reason why we didn't go with DateTimeFormatter is that it needs API level 26, while A-C compatibility requires us to support API level 21. Not sure if we're still required to stick to 21 though..

It does appear that SDK 21 is still the minimum support level for A-C and there aren't any other components that are using DateTimeFormatter, they all appear to be using SimpleTimeFormat yet. Might as well close this as won't fix until A-C updates minSdk.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.