Commit 9aa58d17 authored by Ricki Hirner's avatar Ricki Hirner

Use US locale for date in User-Agent

parent 553b7823
Pipeline #22716975 passed with stages
in 8 minutes and 17 seconds
......@@ -18,7 +18,7 @@ android {
defaultConfig {
applicationId "at.bitfire.davdroid"
versionCode 224
versionCode 225
buildConfigField "long", "buildTime", System.currentTimeMillis() + "L"
buildConfigField "boolean", "customCerts", "true"
......@@ -218,7 +218,8 @@ class HttpClient private constructor(
private object UserAgentInterceptor: Interceptor {
private val userAgentDateFormat = SimpleDateFormat("yyyy/MM/dd", Locale.getDefault())
// use Locale.US because numbers may be encoded as non-ASCII characters in other locales
private val userAgentDateFormat = SimpleDateFormat("yyyy/MM/dd", Locale.US)
private val userAgentDate = userAgentDateFormat.format(Date(BuildConfig.buildTime))
private val userAgent = "DAVdroid/${BuildConfig.VERSION_NAME} ($userAgentDate; dav4android; okhttp/${Constants.okHttpVersion}) Android/${Build.VERSION.RELEASE}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment