Menu

Date/Time entry GMT keep getting EDT

2007-06-26
2013-06-03
  • Nobody/Anonymous

    I must be missing something.  I am sure that I am.

            Calendar here = Calendar.getInstance();
            here.setTimeZone(TimeZone.getTimeZone("GMT"));  
            SimpleDateFormat timestampFormatWithZone = new SimpleDateFormat("yyyy-MM-dd HH:mm zzz");
            Date date = timestampFormatWithZone.parse("2007-07-01 08:00 GMT");
            here.setTime(date);
            document.replaceItemValue("SEVDATE", here);

    Assistance would be appreciated.

    Thanks,

    Robert

     
    • Kurt Riede

      Kurt Riede - 2007-06-29

      Hello Robert,

      it seems that we have missed the time zone handling in replaceItemValue() and related methods.
      Please feel free to open a bug report for that issue.

      Best regards

      Kurt

       
    • Kurt Riede

      Kurt Riede - 2007-06-29

      Hello Robert,

      here.setTime(date) is equivalent to here.setTimeInMillis(date.getTime()).
      So the time zone of your calendar doesn't change at all.

      Beside some potential problem in domingo, please try to explicitly set the time zone in your calendar, e.g. with
      here.setTimeZone(TimeZone.getTimeZone("GMT"));

      Best regards

      Kurt

       
    • Nobody/Anonymous

      I am able to get the GMT date/time calculated and in the field.  However, when Notes displays it it shows the GMT date/time but with EDT as the zone. 

      In the Notes DB in question a variable is set:

          Dim dateTime As New NotesDateTime( "" )   
          dateTime.LSLocalTime = Now
          gmt=dateTime.GMTTime
          Call uidoc.FieldSetText("dateCreateDate",gmt)
          Call uidoc.FieldSetText("Create",gmt)

      I am attempting to do the same thing from the java application, however, I keep running into the issue of the zone showing up as EDT not GMT.  Any thoughts ?

       

Log in to post a comment.