Constantin Teodorescu wrote:

>
>                 sdf = new SimpleDateFormat("yyyy-MM-dd");
>                 sdf.setLenient(false);
>                 try {
>                         thedate = sdf.parse(s);

Hi,

I've gotten good results by using the SimpleDateFormat constructor with this signature:

SimpleDateFormat(String, Locale)

...You specifiy the locale (which contains the time zone) of the given date string.  
This might
help avoid the problem.  I was getting some strange results before I started doing 
this, because
I'm writing and testing a program in Europe (GMT+1) that's getting deployed in 
California
(PST).  I can dig out the source code for this, if you like.

- Robb


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to