Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry® World™ Development

Reply
Developer
shikha
Posts: 46
Registered: ‎06-23-2009
My Device: Not Specified
Accepted Solution

Time offset using HttpDateParser

Hi,

I am trying to extract date by parsing string,

 

        Date eventDate = new Date(HttpDateParser.parse("2009-07-21T21:30:30-07"));
        SimpleDateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy hh:mmaa");
       
        String temp = dateFormat.format(eventDate);

 

 

My device is set to Pacific time (-8)

 

on running, I get temp as 07-21-2009 2:30 PM

 

Date is fine, but how/why is offset of 7hr in hours? i am expecting 21:30 as hr.

 

How can this be rectified?

 

 

Please use plain text.
Developer
shikha
Posts: 46
Registered: ‎06-23-2009
My Device: Not Specified

Re: Time offset using HttpDateParser

I amhaving exactly the same problem as in this thread,

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=20776

 

The solution provided is not working. Please help!!

 

 

Please use plain text.