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

Java Development

Reply
Highlighted
New Developer
Posts: 35
Registered: ‎02-01-2010
My Device: 8300
My Carrier: Etisalat
Accepted Solution

Numeric Time zone value

Hi all

how can I get the numeric value of the current time zone on the device

 

ex: GMT = 0.0

      Cairo = +2.0

      XXX =    -6.0

     

coz the TimeZone API get a string representation of the time zone Id, not the numeric representation.

 

thanks, all

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Numeric Time zone value

<timezone>.getRawOffset() or

<timezone>.getOffset?

New Developer
Posts: 35
Registered: ‎02-01-2010
My Device: 8300
My Carrier: Etisalat

Re: Numeric Time zone value

thank u very much, it works well !

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Numeric Time zone value

Just be careful, one or both of those does not take DST into consideration. 

New Developer
Posts: 35
Registered: ‎02-01-2010
My Device: 8300
My Carrier: Etisalat

Re: Numeric Time zone value

don't worry, I don't need DLS coz i already have a setting for it in my application.

Thanks again