Examples of Timestamp


Examples of java.sql.Timestamp

      }
    }
   
    // �����û����������һ�η���ʱ���Լ����ʵ�ַ,ͬʱ��������״̬
    ubean.setLastAddr(req.getRemoteAddr());
    ubean.setLastTime(new Timestamp(System.currentTimeMillis()));
    ubean.setKeepDays(keepDays);
    ubean.setOnlineStatus(1);
    DLOGUserManager.update(ubean);

    // д��¼��Ϣ��cookie,��ʹ��session�����û�����
View Full Code Here

Examples of java.sql.Timestamp

   * @return
   */
  public static int readNewMsgs(int userid) {
    return commitNamedUpdate("READ_MESSAGE", new Object[] {
        MessageBean.I_STATUS_READ,
        new Timestamp(System.currentTimeMillis()), new Integer(userid),
        MessageBean.I_STATUS_NEW });
  }
View Full Code Here

Examples of java.sql.Timestamp

   * @return
   */
  public static boolean createUser(UserBean user){
    if(user == null)
      return false;
    Timestamp ct = new Timestamp(System.currentTimeMillis());
    user.setRegTime(ct);
    user.setLastTime(ct);
    user.setStatus(UserBean.STATUS_NORMAL);
    save(user);
    return true;
View Full Code Here

Examples of java.sql.Timestamp

    if(bean.getContactInfo()!=null)
      user.setContactInfo((ContactInfo)bean.getContactInfo().clone());
    if(bean.getCount()!=null)
      user.setCount((CountInfo)bean.getCount().clone());
    user.setResume(bean.getResume());
    user.setRegTime(new Timestamp(bean.getRegTime().getTime()));
    if(bean.getLastTime()!=null)
      user.setLastTime(new Timestamp(bean.getLastTime().getTime()));
    user.setLastAddr(bean.getLastAddr());
    user.setStatus(bean.getStatus());
    user.setKeepDays(bean.getKeepDays());
    user.setOwnSiteId(bean.getOwnSiteId());
    user.setPortrait(bean.getPortrait());
View Full Code Here

Examples of java.sql.Timestamp

      Calendar calendar = new GregorianCalendar();

      if (eventDetails.getStartdate() != null)
      {
        Timestamp date = (Timestamp)eventDetails.getStartdate();
        calendar.setTimeInMillis(date.getTime());

        int[] hhmm = new int[2];
        hhmm[0] = calendar.get(Calendar.HOUR_OF_DAY);
        hhmm[1] = calendar.get(Calendar.MINUTE);

        String strTime = CVUtility.convertTime24HrsFormatToStr(hhmm);
        dynaForm.set("startmonth", Integer.toString(calendar.get(Calendar.MONTH) + 1));
        dynaForm.set("startday", Integer.toString(calendar.get(Calendar.DATE)));
        dynaForm.set("startyear", Integer.toString(calendar.get(Calendar.YEAR)));
        dynaForm.set("starttime", strTime);
      }

      if (eventDetails.getEnddate() != null)
      {
        Timestamp date = (Timestamp)eventDetails.getEnddate();
        calendar.setTimeInMillis(date.getTime());

        int[] hhmm = new int[2];
        hhmm[0] = calendar.get(Calendar.HOUR_OF_DAY);
        hhmm[1] = calendar.get(Calendar.MINUTE);

        String strTime = CVUtility.convertTime24HrsFormatToStr(hhmm);
        dynaForm.set("endmonth", Integer.toString(calendar.get(Calendar.MONTH) + 1));
        dynaForm.set("endday", Integer.toString(calendar.get(Calendar.DATE)));
        dynaForm.set("endyear", Integer.toString(calendar.get(Calendar.YEAR)));
        dynaForm.set("endtime", strTime);
      }

      if (eventDetails.getCreateddate() != null)
      {
        Timestamp date = (Timestamp)eventDetails.getCreateddate();
        calendar.setTimeInMillis(date.getTime());

        String month = getCalenderMonth(calendar.get(Calendar.MONTH) + 1);

        dynaForm.set("createddate", month + " " + Integer.toString(calendar.get(Calendar.DATE)) + ", " + Integer.toString(calendar.get(Calendar.YEAR)));
      }

      if (eventDetails.getModifieddate() != null)
      {
        Timestamp date = (Timestamp)eventDetails.getModifieddate();

        calendar.setTimeInMillis(date.getTime());

        String month = getCalenderMonth(calendar.get(Calendar.MONTH) + 1);

        dynaForm.set("modifieddate", month + " " + Integer.toString(calendar.get(Calendar.DATE)) + ", " + Integer.toString(calendar.get(Calendar.YEAR)));
      }
View Full Code Here

Examples of java.sql.Timestamp

        int startday   = Integer.parseInt(day);
        int startmonth = Integer.parseInt(month) - 1;
        int startyear  = Integer.parseInt(year);
        GregorianCalendar gc = new GregorianCalendar(TimeZone.getTimeZone(timeZone));
        gc.set(startyear,startmonth,startday,0,0,0);
        return new  Timestamp(gc.getTimeInMillis());
    }
View Full Code Here

Examples of java.sql.Timestamp

  {
    GregorianCalendar gc = new GregorianCalendar(currentTZ);
    gc.setTime(dt);
    gc.get(Calendar.YEAR);
    gc.setTimeZone(targetTZ);
    Timestamp nts = new Timestamp(gc.getTimeInMillis());
    return nts;
  }
View Full Code Here

Examples of java.sql.Timestamp

      noteForm.setDetail(noteVO.getDetail());
      noteForm.setCreatedid(String.valueOf(noteVO.getCreatedBy()));
      noteForm.setCreatedby(noteVO.getCreatedByVO().getFirstName() + " " + noteVO.getCreatedByVO().getLastName());

      DateFormat df = new SimpleDateFormat("MMM-dd-yyyy hh:mm:ss a");
      Timestamp createdTimestamp = noteVO.getCreatedOn();
      String createdDateString = "";
      if (createdTimestamp != null) {
        Date valueDate = new Date(createdTimestamp.getTime());
        createdDateString = df.format(valueDate);
      }
      noteForm.setCreateddate(createdDateString);

      Timestamp modifiedTimestamp = noteVO.getModifiedOn();
      String modyfiedDateString = "";
      if (modifiedTimestamp != null) {
        Date valueDate = new Date(modifiedTimestamp.getTime());
        modyfiedDateString = df.format(valueDate);
      }
      noteForm.setModifieddate(modyfiedDateString);

      if (noteVO.getRelateEntity() > 0) {
View Full Code Here

Examples of java.sql.Timestamp

          newEventHashMap.put("WhoShouldAttend", oldEvent.getWhoshouldattend());
          newEventHashMap.put("MaxAttendees", Integer.toString(oldEvent.getMaxattendees()));
          newEventHashMap.put("Moderator", Integer.toString(oldEvent.getModeratorid()));
          //newEventHashMap.put("StartDate", (Timestamp) oldEvent.getStartdate());
          //newEventHashMap.put("EndDate", (Timestamp) oldEvent.getEnddate());
          Timestamp startTimestamp = (Timestamp)oldEvent.getStartdate();
          Timestamp endTimestamp = (Timestamp)oldEvent.getEnddate();

          //This section SHOULD NOT NEED TO BE DONE.
          //The way Timestamps are currently handled means I have to do this this way.
          Calendar tempCalendar = new GregorianCalendar();
          //fix the start time
          tempCalendar.setTimeInMillis(startTimestamp.getTime());
          tempCalendar.add(Calendar.YEAR, 1900);
          startTimestamp.setTime(tempCalendar.getTimeInMillis());

          //fix the end time
          tempCalendar.setTimeInMillis(endTimestamp.getTime());
          tempCalendar.add(Calendar.YEAR, 1900);
          endTimestamp.setTime(tempCalendar.getTimeInMillis());
          //End of This section SHOULD NOT NEED TO BE DONE.

          newEventHashMap.put("StartDate", startTimestamp);
          newEventHashMap.put("EndDate", endTimestamp);
View Full Code Here

Examples of java.sql.Timestamp

        int startday   = Integer.parseInt(day);
        int startmonth = Integer.parseInt(month) - 1;
        int startyear  = Integer.parseInt(year);
        GregorianCalendar gc = new GregorianCalendar(TimeZone.getTimeZone(timeZone));
        gc.set(startyear,startmonth,startday,0,0,0);
        return new  Timestamp(gc.getTimeInMillis());
    }
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.