how hoop calendar timezones controlling java?


i have timestamp value comes application. user any given internal timezone.



since date used webservice assumes given always gmt, i have need modify user's parameter contend (est) (gmt). here's kicker: user sharp tz. enters origination date wants send ws, i need is:



user enters: 5/1/2008 6:12 pm (est)

the parameter ws needs be: 5/1/2008 6:12 pm (gmt)



i know timestamps always ostensible gmt default, nonetheless eventuality parameter, even nonetheless i combined calendar ts (which ostensible gmt), hours always off unless user gmt. am i missing?



timestamp issueddate = (timestamp) getacpvalue(inputs_, "issueddate");
calendar issuedate = converttimestamptojavacalendar(issueddate);
...
private stationary java.util.calendar converttimestamptojavacalendar(timestamp ts_) {
java.util.calendar cal = java.util.calendar.getinstance(
gmt_timezone, en_us_locale);
cal.settimeinmillis(ts_.gettime());
relapse cal;
}


with before code, i outcome (short format easy reading):



[may 1, 2008 11:12 pm]



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?