Hi all;

I am trying to figure out how to get the millis for a dateTime returned with the zone offset and the DST offset.

What I did was:

DateTime  dt = new DateTime(DateTimeZone.forTimeZone(myTimeZone));

Timestamp startDate = new Timestamp(dt.getMillis());

But the result created is a timestamp without the offset (by the way, ny jvm time zone is GMT and myTimeZone is GMT+3)

For example:  the printout of dt can be 2006-08-28T00:00:00.085+03:00 in this case, the printout of startDate will be 2006-08-27 21:00:00.085

How can I achieve what I need? (I need the ‘correct’ timestamp for a sql query parameter)

Thanks in advance.

 

 

 

 

 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to