BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 06-15-2011, 03:16 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Mar 2011
Model: 8900
PIN: N/A
Carrier: Torch
Posts: 59
Post Thanks: 3
Thanked 1 Time in 1 Post
Default TimeZone Offset

Please Login to Remove!

I am using following way to calculate time zone offset

TimeZone tz= TimeZone.getTimeZone("America/New_York");
Calendar c=Calendar.getInstance();
c.setTimeZone(tz);
c.setTime(new Date());
double ofst=tz.getOffset(1, c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DAY_OF_MONTH), c.get(Calendar.DAY_OF_WEEK), c.get(Calendar.MILLISECOND));
System.out.println("Offset: "+ofst);

it gives me -25200000 offset

if i pass value as: America/NewYork it gives me 0.0

anyone knows proper way of calculating offset
what is difference b/w America/New_York & America/NewYork
how can i get timezone offset of toronto if i pass value as
Canada/Toronto it gives me 0.0
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads for: TimeZone Offset
Thread Thread Starter Forum Replies Last Post
TimeZone Offset xmncxzvt Developer Forum 0 06-15-2011 02:39 AM
Hoe to change the Server Timezone in simulator samuels007 Developer Forum 0 04-01-2009 02:00 AM
phpberrystats blubyu BES Admin Corner 107 01-07-2009 11:27 AM
Offline capability and TimeZone vashwin Developer Forum 0 11-08-2007 01:48 PM
7100g and timezone tintin_bb General Legacy Device Discussion 2 05-08-2007 08:50 AM

TDA7297 2*15W Audio Amplifier Board 15W+15W Dual-Channel DIY DC 12V
$5.99
TDA7297 2*15W Audio Amplifier Board 15W+15W Dual-Channel DIY DC 12V pictureGalil ICM 2900 Interconnect module for motion controller
$100.0
Galil ICM 2900 Interconnect module for motion controller picture50 Pcs LM301AN DIP-8 LM301 Operational Amplifiers
$14.68
50 Pcs LM301AN DIP-8 LM301 Operational Amplifiers picture1PC New Fanuc A06B-6111-H030#H550 Spindle Amplifier In Box #WM06
$5098.99
1PC New Fanuc A06B-6111-H030#H550 Spindle Amplifier In Box #WM06 pictureGalil ICM 2900 Interconnect module for motion controller
$100.0
Galil ICM 2900 Interconnect module for motion controller picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.