Package java.util

Examples of java.util.TimeZone$DisplayNames


  private static Logger logger = Logger.getLogger(SelectDateTimeHandler.class);
  public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws RuntimeException, Exception {
    HttpSession session = request.getSession(true);
    UserObject user = (UserObject)session.getAttribute("userobject");
    UserPrefererences prefs = user.getUserPref();
    TimeZone tz = TimeZone.getTimeZone(prefs.getTimeZone());
    Locale locale = request.getLocale();
   
    String forward = ".view.calendar.datetime";
    // "dateTimeSelectForm" in mappings/calendar.xml
    DynaActionForm dateForm = (DynaActionForm) form;
View Full Code Here


  static StatementImpl createMockStatement(int cursorType) throws SQLException {
    StatementImpl statement = mock(StatementImpl.class);
    stub(statement.getDQP()).toReturn(mock(DQP.class));
    stub(statement.getResultSetType()).toReturn(cursorType);
    TimeZone tz = TimeZone.getTimeZone("GMT-06:00"); //$NON-NLS-1$
    TimeZone serverTz = TimeZone.getTimeZone("GMT-05:00"); //$NON-NLS-1$
    stub(statement.getDefaultCalendar()).toReturn(Calendar.getInstance(tz));
    stub(statement.getServerTimeZone()).toReturn(serverTz);
    return statement;
  }
View Full Code Here

    Collection v = cvdl.executeQuery();
    cvdl.clearParameters();
    cvdl.destroy();

    Iterator it = v.iterator();
    TimeZone tz = TimeZone.getTimeZone("EST");
    int i = 0;

    while (it.hasNext()) {
      i++;
      HashMap hm = (HashMap)it.next();
View Full Code Here

    Collection v = cvdl.executeQuery();
    cvdl.clearParameters();
    cvdl.destroy();

    Iterator it = v.iterator();
    TimeZone tz = TimeZone.getTimeZone("EST");
    int i = 0;

    while (it.hasNext()) {
      i++;
      HashMap hm = (HashMap)it.next();
View Full Code Here

    cvdl.clearParameters();
    cvdl.destroy();

    Iterator it = v.iterator();
    TimeZone tz = TimeZone.getTimeZone("EST");
    int i = 0;

    while (it.hasNext()) {
      i++;
      HashMap hm = (HashMap)it.next();
View Full Code Here

    }
   
    // ================= Function - MODIFYTIMEZONE ========================
   
    public static Object modifyTimeZone(Timestamp value, String originalTimezoneString, String targetTimezoneString) {
        TimeZone originalTimeZone = TimeZone.getTimeZone(originalTimezoneString);
        TimeZone dbmsTimeZone = TimeZone.getTimeZone(targetTimezoneString);

        // Check that the dbms time zone is really different than the local time zone
        if (originalTimeZone.equals(dbmsTimeZone)) {
            return value;
        }
View Full Code Here

       
        return TimestampWithTimezone.createTimestamp(value, originalTimeZone, cal);
    }

    public static Object modifyTimeZone(CommandContext context, Timestamp value, String targetTimezoneString) {
        TimeZone dbmsTimeZone = TimeZone.getTimeZone(targetTimezoneString);

        Calendar cal = Calendar.getInstance(dbmsTimeZone);
       
        return TimestampWithTimezone.createTimestamp(value, context.getServerTimeZone(), cal);
    }
View Full Code Here

        // this sql is for callable statement, don't check any more
        ArgCheck.isNotNull(sql, JDBCPlugin.Util.getString("MMPreparedStatement.Err_prep_sql")); //$NON-NLS-1$
        this.prepareSql = sql;

        TimeZone timezone = connection.getServerConnection().getLogonResult().getTimeZone();

        if (timezone != null && !timezone.hasSameRules(getDefaultCalendar().getTimeZone())) {
          this.serverCalendar = Calendar.getInstance(timezone);
        }       
    }
View Full Code Here

   */
  public void changeTimeZoneOfAllDates(String currentTimeZone, String newTimeZone)
  {
    logger.debug("start ts before changing timezone: "+this.getActivityStartDate().toString());
    logger.debug("end ts before changing timezone: "+this.getActivityEndDate().toString());
    TimeZone currentTZ = TimeZone.getTimeZone(currentTimeZone);
    TimeZone targetTZ = TimeZone.getTimeZone(newTimeZone);
    if (this.getActivityStartDate() != null) {
      this.setActivityStartDate(CVUtility.convertTimeZone(this.getActivityStartDate(), currentTZ, targetTZ));
    } //end of if statement (this.getActivityStartDate() != null)
    if (this.getActivityEndDate() != null) {
      this.setActivityEndDate(CVUtility.convertTimeZone(this.getActivityEndDate(), currentTZ, targetTZ));
View Full Code Here

    Collection v = cvdl.executeQuery();
    cvdl.clearParameters();
    cvdl.destroy();

    Iterator it           = v.iterator();
    TimeZone tz           = TimeZone.getTimeZone("IST");
    int i                 = 0;

    while (it.hasNext())
    {
      i++;
View Full Code Here

TOP

Related Classes of java.util.TimeZone$DisplayNames

Copyright © 2018 www.massapicom. 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.