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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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
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
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 ?