Examples of SimpleTimeZone


Examples of com.ibm.icu.util.SimpleTimeZone

    }
   
    public void TestReplacingZoneString() {
        Date testDate = new Date();
        TimeZone testTimeZone = TimeZone.getTimeZone("America/New_York");
        TimeZone bogusTimeZone = new SimpleTimeZone(1234, "Etc/Unknown");
        Calendar calendar = Calendar.getInstance();
        ParsePosition parsePosition = new ParsePosition(0);

        ULocale[] locales = ULocale.getAvailableLocales();
        int count = 0;
View Full Code Here

Examples of java.util.SimpleTimeZone

     * is used.
     */
    public Time(
        Date    date)
    {
        SimpleTimeZone      tz = new SimpleTimeZone(0, "Z");
        SimpleDateFormat    dateF = new SimpleDateFormat("yyyyMMddHHmmss");

        dateF.setTimeZone(tz);

        String  d = dateF.format(date) + "Z";
View Full Code Here

Examples of java.util.SimpleTimeZone

    * @param format The format for the pastDate
    * @return "x <units of time> ago on <formatted pastDate in GMT time>"
    */
   public static String getMomentsAgoString(Date pastDate, DateFormat format) {
       String timeAgo = getMomentsAgoString(pastDate);
       format.setTimeZone(new SimpleTimeZone(0, "GMT"));
       if (timeAgo.length() > 0) timeAgo = timeAgo.concat(" on ");
       return timeAgo.concat(format.format(pastDate));
   }
View Full Code Here

Examples of java.util.SimpleTimeZone

        LOG.log(Level.FINE, "server sending reply: ", reply);

        long timeToLive = 0;
        if (request.getJMSExpiration() > 0) {
            TimeZone tz = new SimpleTimeZone(0, "GMT");
            Calendar cal = new GregorianCalendar(tz);
            timeToLive =  request.getJMSExpiration() - cal.getTimeInMillis();
        }
       
        if (timeToLive >= 0) {
View Full Code Here

Examples of java.util.SimpleTimeZone

  }
 
  public void setTimeZone(String sTime) throws NumberFormatException {
    timezone = sTime;
    String[] aHourMins = sTime.split(":");
    oZone = new SimpleTimeZone((sTime.charAt(0)=='+' ? 1 : -1)*(Integer.parseInt(aHourMins[0])*3600000+Integer.parseInt(aHourMins[1])*60000), sTime);
  }
View Full Code Here

Examples of java.util.SimpleTimeZone

        oTimes.setStartTime(new DateTime(oMeet.getDate(DB.dt_start)));
      oTimes.setEndTime(new DateTime(oMeet.getDate(DB.dt_end)));
      } else {
        int lSign = sTimeZone.charAt(0)=='+' ? 1 : -1;
        String[] aTimeZone = Gadgets.split2(sTimeZone.substring(1),':');
        SimpleTimeZone oTmz = new SimpleTimeZone(lSign*(Integer.parseInt(aTimeZone[0])*3600000+Integer.parseInt(aTimeZone[1])*60000), sTimeZone);
        oTimes.setStartTime(new DateTime(oMeet.getDate(DB.dt_start),oTmz));
      oTimes.setEndTime(new DateTime(oMeet.getDate(DB.dt_end),oTmz));
      }
    oEvnt.addTime(oTimes);
    DBSubset oFlws = oMeet.getFellows(oConn);
View Full Code Here

Examples of java.util.SimpleTimeZone

        myQuery.setMaximumStartTime(new DateTime(oMeet.getDate(DB.dt_end)));
      if (DebugFile.trace) DebugFile.writeln("CalendarQuery.query("+feedUrl.toString()+","+oMeet.getDateTime24(DB.dt_start)+","+oMeet.getDateTime24(DB.dt_end)+", without time zone)");
      } else {
        int lSign = sTimeZone.charAt(0)=='+' ? 1 : -1;
        String[] aTimeZone = Gadgets.split2(sTimeZone.substring(1),':');
        SimpleTimeZone oTmz = new SimpleTimeZone(lSign*(Integer.parseInt(aTimeZone[0])*3600000+Integer.parseInt(aTimeZone[1])*60000), sTimeZone);
        myQuery.setMinimumStartTime(new DateTime(oMeet.getDate(DB.dt_start),oTmz));
        myQuery.setMaximumStartTime(new DateTime(oMeet.getDate(DB.dt_end),oTmz));
      if (DebugFile.trace) DebugFile.writeln("CalendarQuery.query("+feedUrl.toString()+","+oMeet.getDateTime24(DB.dt_start)+","+oMeet.getDateTime24(DB.dt_end)+", GMT "+oTmz.getID()+")");
      }

    CalendarEventFeed oFeed = oCalSrv.query(myQuery, CalendarEventFeed.class);   
    for (int i = 0; i < oFeed.getEntries().size(); i++) {
        CalendarEventEntry oEvnt = oFeed.getEntries().get(i);
View Full Code Here

Examples of java.util.SimpleTimeZone

     * is used.
     */
    public Time(
        Date    date)
    {
        SimpleTimeZone      tz = new SimpleTimeZone(0, "Z");
        SimpleDateFormat    dateF = new SimpleDateFormat("yyyyMMddHHmmss");

        dateF.setTimeZone(tz);

        String  d = dateF.format(date) + "Z";
View Full Code Here

Examples of java.util.SimpleTimeZone

    public DERGeneralizedTime(
        Date time)
    {
        SimpleDateFormat dateF = new SimpleDateFormat("yyyyMMddHHmmss'Z'");

        dateF.setTimeZone(new SimpleTimeZone(0,"Z"));

        this.time = dateF.format(time);
    }
View Full Code Here

Examples of java.util.SimpleTimeZone

    public Date getDate()
      throws ParseException
    {
        SimpleDateFormat dateF = new SimpleDateFormat("yyyyMMddHHmmss'Z'");

        dateF.setTimeZone(new SimpleTimeZone(0, "Z"));

        return dateF.parse(time);
    }
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.