ZonedDateTime format and parsing exception

I have a problem with parsing zoned date time: DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyy-MM-ddzhh:mm"); ZonedDateTime.parse(s, formatter); and error: java.time.format.DateTimeParseException: Text ‘2022-05-24UTC12:15’ could not be parsed at index 10 whats wrong with this code ? thanks >Solution : tl;dr – You have the wrong pattern… The character z is not able to parse "UTC" because UTC is… Read More ZonedDateTime format and parsing exception

Add dynamic value in url retrofit

I have this below URL URL TO CALL In the interface I have as @GET("storage/presigned-url?bucketName=files&key=payment-receipt/{fileName}&httpVerb=2&contentType=image/jpeg") suspend fun fileUploadPathCheque(@Path("fileName") name: String): Response<String> I want to replace the file name with some value I am calling the function as Api.fileUploadPathCheque(UUID.randomUUID().toString().plus(".jpg")) I get the following exception ava.lang.IllegalArgumentException: URL query string "bucketName=files&key=payment-receipt/{fileName}&httpVerb=2&contentType=image/jpeg" must not have replace block. For dynamic… Read More Add dynamic value in url retrofit