Skip to content

Commit

Permalink
ANDROAPP-6002-Modify-Date-storing-for-TimeZone-and-Daylight-Saving-Ti…
Browse files Browse the repository at this point in the history
…me-offset (#233)

* update: [ANDROAPP-6002] Timezone formated properly

* update: [ANDROAPP-6002] Code formatted
  • Loading branch information
DavidAparicioAlbaAsenjo authored Apr 25, 2024
1 parent 4306d14 commit c3e3ef1
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,13 @@ internal fun getDate(milliSeconds: Long?, format: String? = "ddMMyyyy"): String
return if (milliSeconds != null) {
cal.timeInMillis = milliSeconds
val formater = SimpleDateFormat(format)
formater.format(cal.time)
if (gmtOffset < 0) {
var day = formater.format(cal.time).substring(0, 2).toInt()
day += 1
formater.format(cal.time).replaceRange(0, 2, String.format("%02d", day))
} else {
formater.format(cal.time)
}
} else {
""
}
Expand Down

0 comments on commit c3e3ef1

Please sign in to comment.