diff --git a/.travis.yml b/.travis.yml index bff98336..aa184901 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ cache: directories: - "$HOME/.gradle/caches/" - "$HOME/.gradle/wrapper/" +script: "./gradlew assembleDebug" deploy: provider: releases api_key: @@ -34,5 +35,4 @@ deploy: skip_cleanup: true on: tags: true - repo: fan123199/V2ex-simple -script: "./gradlew assembleDebug" + diff --git a/app/src/main/java/im/fdx/v2ex/utils/TimeUtil.kt b/app/src/main/java/im/fdx/v2ex/utils/TimeUtil.kt index a5e83343..ff3bcb8b 100644 --- a/app/src/main/java/im/fdx/v2ex/utils/TimeUtil.kt +++ b/app/src/main/java/im/fdx/v2ex/utils/TimeUtil.kt @@ -48,7 +48,8 @@ object TimeUtil { _created *= 1000 // DateFormat format = SimpleDateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.MEDIUM, Locale.CHINA); - val format1 = SimpleDateFormat("yyyy/MM/dd") + val format1 = SimpleDateFormat("yyyy/MM/dd", Locale.US) + format1.timeZone = TimeZone.getTimeZone("GMT+8:00") return format1.format(_created) }