Ok, then I assume the problem is that calendar.getTimeInMillis() returns the timestamp in UTC, and you need it in your local timezone?
-----Original Message----- From: Wojciech Ciesielski [mailto:[EMAIL PROTECTED] Sent: 19 September 2005 16:13 To: 'Struts Users Mailing List' Subject: RE: a little bit OT: Calendar misbehaviour > You can try use the SimpleDateFormat class in java.text to parse the > time string. That's what I am doing: > > Java.sql.Timestamp toReturn; > > SimpleDateFormat dateFormatTime("HH:mm"); > > Calendar cal = new GregorianCalendar(); > > cal.setTime(dateFormatTime.parse(timeString)); > > toReturn = new Timestamp(cal.getTimeInMillis()); The problem is that I need to get Timestamp object but I can't find a way to set it... Apart from manual calculation of timestamp value based on Calendar.getField() ... Wojtek --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] E-Mail Disclaimer Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen. For legal and security reasons the information provided in this e-mail is not legally binding. Upon request we would be pleased to provide you with a legally binding confirmation in written form. Any form of unauthorised use, publication, reproduction, copying or disclosure of the content of this e-mail is not permitted. This message is exclusively for the person addressed or their representative. If you are not the intended recipient of this message and its contents, please notify the sender immediately. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]