Package org.joda.time

Examples of org.joda.time.MutableDateTime.toDate()


        modelObject = changeTimeZone(modelObject, zone);
      }

      MutableDateTime mDate = new MutableDateTime(modelObject);

      date = mDate.toDate();

      if (use12HourFormat)
      {
        int hourOfHalfDay = mDate.get(DateTimeFieldType.hourOfHalfday());
        hours = hourOfHalfDay == 0 ? 12 : hourOfHalfDay;
View Full Code Here


          date.setMillis(DateTimeZone.getDefault().getMillisKeepLocal(
              DateTimeZone.forTimeZone(zone), date.getMillis()));
        }

        // the date will be in the server's timezone
        setConvertedInput(date.toDate());
      }
      catch (RuntimeException e)
      {
        DateTimeField.this.error(e.getMessage());
        invalid();
View Full Code Here

      {
        throw new ConversionException(e);
      }
      // apply the server time zone to the parsed value
      dt.setZone(getTimeZone());
      return dt.toDate();
    }
    else
    {
      try
      {
View Full Code Here

        {
          date.set(DateTimeFieldType.halfdayOfDay(), 0);
        }

        // the date will be in the server's timezone
        setConvertedInput(date.toDate());
      }
      catch (RuntimeException e)
      {
        DateTimeField.this.error(e.getMessage());
        invalid();
View Full Code Here

      }
      // parse date retaining the time of the submission
      format.parseInto(dt, value, 0);
      // apply the server time zone to the parsed value
      dt.setZone(getTimeZone());
      return dt.toDate();
    }
    else
    {
      return format.parseDateTime(value).toDate();
    }
View Full Code Here

          date.setMillis(DateTimeZone.getDefault().getMillisKeepLocal(
              DateTimeZone.forTimeZone(zone), date.getMillis()));
        }

        // the date will be in the server's timezone
        setConvertedInput(date.toDate());
      }
      catch (RuntimeException e)
      {
        DateTimeField.this.error(e.getMessage());
        invalid();
View Full Code Here

          date.setMillis(DateTimeZone.getDefault().getMillisKeepLocal(
              DateTimeZone.forTimeZone(zone), date.getMillis()));
        }

        // the date will be in the server's timezone
        setConvertedInput(date.toDate());
      }
      catch (RuntimeException e)
      {
        DateTimeField.this.error(e.getMessage());
        invalid();
View Full Code Here

      {
        throw new ConversionException(e);
      }
      // apply the server time zone to the parsed value
      dt.setZone(getTimeZone());
      return dt.toDate();
    }
    else
    {
      try
      {
View Full Code Here

      {
        throw new ConversionException(e);
      }
      // apply the server time zone to the parsed value
      dt.setZone(getTimeZone());
      return dt.toDate();
    }
    else
    {
      try
      {
View Full Code Here

        {
          date.set(DateTimeFieldType.halfdayOfDay(), 0);
        }

        // the date will be in the server's timezone
        return date.toDate();
      }
      catch (RuntimeException e)
      {
        DateTimeField.this.error(e.getMessage());
        invalid();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.