我使用Joda时间来验证带有时区的时间戳。当我通过无效的日期或时间时,它按预期工作。例如,当我以秒的形式传递99时,它会产生以下错误:parse "20131231235999+00": Value 99 for secondOfMinute must be in the range [0,59]
我希望它也会抛出一个类似的异常,因为我也通过了无效的时区。我原以为UTC的偏移值小于-12,大于+14小时()
我使用JodaTime#DateTime,我需要嘲笑它的行为。由于不可能直接模拟JodaTime#DateTime,所以我创建了它的接口public interface Clock { DateTime getFourPM_EST();}public class JodaTime;
public PrintProces