<SimpleDateFormat from UTC Calendar Error when Loc...
# stackoverflow
u
SimpleDateFormat from UTC Calendar Error when Locale is Arabic I am attempting to convert a timestamp into a date, which I am then putting into the query parameters of a request. Here is the function that converts a timestamp into a date: override fun fromTimestamp(timestamp: Long): String { val tz = TimeZone.getTimeZone("UTC") val calendar = Calendar.getInstance(tz) calendar.timeInMillis = timestamp // Quoted "Z" to indicate UTC, no timezone offset val df = SimpleDateFormat("yyyy-MM-dd'T'HHmmss.SSS'Z'") df.timeZone = tz...