Creates a new instance with the passed values.
Creates new instance based on the passed Java Time value.