Category Archives: Joda-Time

Joda getting a date without a time (midnight)

LocalDate localDate = new LocalDate(); localDate.toDateTimeAtStartOfDay(); Advertisements

Posted in Java, Joda-Time | Leave a comment

JVM showing wrong time

If you JVM is showing the wrong time, it may be because it is picking up the wrong timezone. Specify the following to fix it: -Duser.timezone=”America/Louisville”

Posted in Java, Joda-Time | Tagged , , | Leave a comment

Joda Time Timezones

I was tasked with comparing one date to another to see which one was greater. To compound the issue. They can be in different timezones. I tried to change the timezone of the DateTime object, but nothing happened. This is … Continue reading

Posted in Java, Joda-Time | Leave a comment

Parsing Strings to/from Joda-Time

To parse a string into a DateTime object: To output the formatted value of a DateTime object as a String:

Posted in Collections, Java, Joda-Time | Leave a comment