jodatime

    2熱度

    1回答

    明確使用withLocale將語言環境設置爲德語會導致am/pm字符串在時間值中進行本地化,但不會轉換爲適用於該語言環境的24小時時間格式。 當創建新進程時,Locale.setLocale(Locale.GERMAN);已完成,格式正確。 不應該withLocale()影響有問題的語言環境的所有方面? // Code snippet where call is being made: Log.

    0熱度

    2回答

    即時通訊從weeknumber創建日期,以及僅限於星期幾。我已經成功完成了SimpleDateFormat,但我想將它保存爲jodatime,我已經嘗試了很多事情,但沒有任何實際工作。 這是我的代碼到目前爲止。 SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); Calendar cal = Calendar.g

    4熱度

    1回答

    用下面的程序: ; src/webapp/core.clj (ns webapp.core (:require [compojure.core :refer [defroutes GET]] [ring.middleware.json :as mid-json] [clj-time.jdbc])) (defn foo [request] {:b

    1熱度

    1回答

    我有一個場景,我需要存儲日期時間,其中有時區,而不是轉換爲本地時區。 例如,我在Europe/Berlin時區和America/New_York時區獲得日期。如果我的JVM在柏林,則America/New_York的日期時間正在轉換爲柏林時區。 我用彈簧註釋: @Type(type = "org.jadira.usertype.dateandtime.joda.PersistentDateTime

    1熱度

    1回答

    是否有可能從我的構建中去除喬達時間的時區文件?我只在發佈版本中使用1,在調試版本中使用2以在測試中使用。 我的應用程序只在一個國家可用,減少2MB似乎是一個好主意讓我圍繞20MB標記。

    1熱度

    2回答

    有關的startDate和結束日期在一個月的天數如下我怎麼determin期間的月和日(還剩下什麼呢): String pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; SimpleDateFormat format = new SimpleDateFormat(pattern); Date start = format.parse("2016-11-09T0

    4熱度

    2回答

    我使用喬達時間解析幾年是這樣的: private DateTime attemptParse(String pattern, String date) { DateTimeFormatter parser = DateTimeFormat.forPattern(pattern).withLocale(Locale.ENGLISH); DateTime parsedDateT

    4熱度

    2回答

    我審查了與#2時區的許多問題沒有得到更新,但我找不到一個的問題,我掙扎: 爲什麼Joda的DateTimeZone.getDefault()在TZ更改(在恢復應用程序之後?)時返回更新的時區? TimeZone.getDefault()似乎工作得很好。 我應該使用DateTimeZone.forTimeZone(TimeZone.getDefault())來獲得最新的Joda的DateTimeZo

    -4熱度

    1回答

    我當前正在嘗試模擬DateTime對象,以便可以攔截它並使其每次在測試中創建一個新的DateTime對象時創建一個常量(預定的)DateTime對象。眼下 DateTime start = new LocalDateTime().toDateTime().minusHours(1) DateTime end = new LocalDateTime().toDateTime() ,我嘲諷LocalD

    -2熱度

    3回答

    我有一個日期String像2017-09-16T05:06:18.157,我想將它轉換爲本地時間(IST)。印度標準時間將在2017-09-16 10:36:18左右。 隨着喬達時間,我試圖將其轉換爲本地,但我無法做到這一點。 下面是我的代碼: private String getConvertDate(String date_server) { DateTimeFormatter in