I'm using Joda, and I'm making a class to store the timestamp for a transaction and persist to a DB. Should I be using an Instant or a DateTime? The most frequently used concept in Joda-Time is that of the instant. An Instant is defined as an instant in the datetime continuum specified as a number of milliseconds from 1970-01-01T00:00Z. This definition of milliseconds is consistent with that of the JDK in Date or Calendar. I have an instance of Instant (org.joda.time.Instant) which I get in some api response. I have another instance from (java.time.Instant) which I get from some other call. An instant in the datetime continuum specified as a number of milliseconds from 1970-01-01T00:00Z. Some classes that represent an instance in the Joda-Time library includes the Instant, DateTime, DateMidnight and MutableDateTime classes. As with all instants, it represents an exact point on the time-line, but limited to the precision of milliseconds. A DateTime calculates its fields with respect to a time zone. Internally, the class holds two pieces of data. Firstly, it holds the datetime as milliseconds from the Java epoch of 1970-01-01T00:00:00Z. java.lang.Object org.joda.time.base ... Get the value of one of the fields of a datetime using the chronology of the instant. Class BaseDateTime java.lang.Object org.joda.time.base.AbstractInstant org.joda.time.base ... Gets the milliseconds of the datetime instant from the Java Why Joda Time? The standard date and time classes prior to Java SE 8 are poor. public interface ReadableInstant extends Comparable Defines an instant in the datetime continuum. This interface expresses the datetime as milliseconds from 1970-01-01T00:00:00Z. The implementation of this interface may be mutable or immutable. This interface only gives access to retrieve data, never to Converting from Joda-Time to java.time ... Joda-Time java.time Notes; DateTime: ... Is there a way to convert Joda-time Instant to Java-time Instant? public interface ReadableInstant extends Comparable Defines an instant in the datetime continuum. This interface expresses the datetime as milliseconds from 1970-01-01T00:00:00Z. The implementation of this interface may be mutable or immutable. This interface only gives access to retrieve data, never to change it. Home Java Java 8 Date LocalDate, LocalDateTime, Instant. ... Time API was needed in Java. org.joda.time.base Class AbstractDateTime java.lang.Object org.joda ... instant. The JDK and Joda-Time both have time ... with this datetime. This date-time Java tutorial describes how to use the java.time APIs introduced in JDK 8 to write date and time code. As an aside I'm pretty sure that it comes down to a difference of opinion between joda and java about what the millisecond representatin of a date is. When I instantiate a java.sql.Timestamp and a DateTime with 1/1/100 00:00:00.000 then ask each for their millisecond value I get -59011675200000 and -59011501144000 respectively An overview starting with some basic classes of the Java 8 package: Instant, LocalDate, LocalTime, and LocalDateTime. JodaTime Instant ... argument to create Instant for current DateTime; Using Instant.now() ... types of arithmetic operations are supported in Joda-Time: DateTime from Long.MIN_VALUE or MAX ... be used to instantiate a valid DateTime or Instant instance ... . java: 129) at org.joda.time. This page provides Java code examples for org.joda.time.Instant. The examples are extracted from open source Java projects from GitHub. DateTime from Long.MIN_VALUE or MAX ... can be used to instantiate a valid DateTime or Instant instance ... . java: 129) at org.joda.time. Gets the value of the specified field from this instant as a long. This queries this instant for the value for the specified field. Converting from Joda-Time to java.time ... Joda-Time java.time Notes; DateTime: ZonedDateTime: ... Is there a way to convert Joda-time Instant to Java-time Instant? java.lang.IllegalArgumentException: No instant converter ... java.lang.IllegalArgumentException: No instant converter found ... at org.joda.time.DateTime. Java code examples for org.joda.time.Instant. Learn how to use java api org.joda.time.Instant DateTime public DateTime(Object instant, DateTimeZone zone) Constructs an instance from an Object that represents a datetime, forcing the time zone to that specified. About Joda-Time provides a quality replacement for the Java date and time classes. Joda-Time is the de facto standard date and time library for Java prior to Java SE 8. Users are now asked to migrate to java.time (JSR-310). Which data type can I use in Java to hold the current date as well as time?. I want to store the datetime in a db as well as having a field in the java bean to hold that. is it java Java SE 8 Date and Time by Ben Evans and Richard Warburton Why do we need a new date and time library? LocalDateTime public LocalDateTime(Object instant, DateTimeZone zone) Constructs an instance from an Object that represents a datetime, forcing the time zone to that specified. Updates to the Original JSR The following information has been updated from the original proposal. The main API for dates, times, instants, and durations. The classes defined here represent the principle date-time concepts, including instants, durations, dates, times, time-zones and periods. Worried about how to solve java Server Vs Client Time difference Problem in java, this post will explain the differences and two solutions for tackling this problem. In this post we will write a CRUD Restful WebService using Spring MVC 4, and write a REST client with RestTemplate to consume those services. We will also test those services using external clients. Lets get going.