ä»åã¯Scalaã®ãã¹ãã®è©±ãæå»ã¾ãããé¢ããå®è£ ããã¹ããããæããã¹ãä¸ã ãç¾å¨æå»ãåºå®ããããç¾å¨æå»ãéå»ã«ããããªã©ã¨ãã£ããã¨ããããããã¨ã¯ãããããJoda-Timeã®DateTime.nowã使ã£ã¦ç¾å¨æå»ãåå¾ãã¦ããå ´åãæå»ãfakeãã¦åºå®ãããã¨ãåºæ¥ãã®ã§ã¡ã¢ã åºå®ããã«ã¯org.joda.time.DateTimeUtilsã®setCurrentMillisFixedãsetCurrentMillisProviderãå©ç¨ãããä¾ãã°ã以ä¸ã®ããã«æéãåºå®ãããã¨ãã§ããã DateTimeUtils.setCurrentMillisFixed(15147648t00000L) // 2018-01-01ã«åºå® println(DateTime.now) // 2018-01-01T09:00:00.000+09:00 DateTimeUtils.s
{{#tags}}- {{label}}
{{/tags}}