Fix for date parsing (#1204)

Fix for date parsing
This commit is contained in:
Mike 2019-06-16 10:30:20 -04:00 committed by Eugene
parent d4b7e3db1f
commit 0f96d5785e
6 changed files with 7 additions and 6 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Mangareader'
pkgNameSuffix = 'en.mangareader'
extClass = '.Mangareader'
extVersionCode = 1
extVersionCode = 2
libVersion = '1.2'
}

View File

@ -10,6 +10,7 @@ import org.jsoup.nodes.Element
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.Response
import java.text.SimpleDateFormat
import java.util.*
class Mangareader : ParsedHttpSource() {
@ -113,7 +114,7 @@ class Mangareader : ParsedHttpSource() {
}
private fun parseDate(date: String): Long {
return SimpleDateFormat("MM/dd/yyyy").parse(date).time
return SimpleDateFormat("MM/dd/yyyy", Locale.US).parse(date).time
}
override fun pageListParse(document: Document): List<Page> {

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Mangatown'
pkgNameSuffix = 'en.mangatown'
extClass = '.Mangatown'
extVersionCode = 1
extVersionCode = 2
libVersion = '1.2'
}

View File

@ -115,7 +115,7 @@ class Mangatown : ParsedHttpSource() {
"Today" -> return Calendar.getInstance().apply{}.timeInMillis
"Yesterday" -> return Calendar.getInstance().apply{add(Calendar.DAY_OF_MONTH, -1)}.timeInMillis
else -> {
return SimpleDateFormat("MMM d, yyyy").parse(date).time
return SimpleDateFormat("MMM d, yyyy", Locale.US).parse(date).time
}
}
}

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: PsychoPlay'
pkgNameSuffix = 'en.psychoplay'
extClass = '.PsychoPlay'
extVersionCode = 1
extVersionCode = 2
libVersion = '1.2'
}

View File

@ -86,7 +86,7 @@ class PsychoPlay : ParsedHttpSource() {
companion object {
val dateFormat by lazy {
SimpleDateFormat("MMM d, yyyy")
SimpleDateFormat("MMM d, yyyy", Locale.US)
}
}