Greenstand / Greenstand/treetracker-android

Replace SimpleDateFormat with kotlinx.datetime

Open
#1,241 3 comments 0 reactions 1 assignee Claimed by @shirish-goyal View on GitHub
2.3 chore good first issue not ready for dev tech-debt triage
Dominant language
Kotlin
Stars
101
Forks
116
PR merge metrics
No merged PRs in 30d

Description

## Problem

Several files use the deprecated and error-prone `SimpleDateFormat` (with `@SuppressLint("SimpleDateFormat")` to suppress warnings). The project already includes `kotlinx.datetime` as a dependency but doesn't use it for date formatting in these locations.

`SimpleDateFormat` is not thread-safe and has locale pitfalls.

## Locations

- `app/src/main/java/org/greenstand/android/TreeTracker/utilities/ImageUtils.kt` line 57
- `app/src/main/java/org/greenstand/android/TreeTracker/api/ObjectStorageClient.kt` lines 114, 148

## Suggested Fix

Replace `SimpleDateFormat` with `kotlinx.datetime` formatting.

## Effort
Low

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.