Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCChart2D for Java
 Showing time axis labels in a different timezone

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
PeterJ Posted - 19 May 2010 : 15:40:13
My machine is in PDT but I would like the time axis labels to appear in GMT. Is this possible?
6   L A T E S T    R E P L I E S    (Newest First)
PeterJ Posted - 20 May 2010 : 10:27:24
Thank you again for the very prompt response. Support of this quality makes a big difference when selecting between plotting packages.

My suggestion would be the addition of a method to set label time zone. My industry (space and aerospace) together with military applications tend to want time presented in GMT/UTZ/Zulu regardless of the user's actual location.
quinncurtis Posted - 19 May 2010 : 23:21:22
We will consider your change as some sort of option, since it may have undesired effects if implemented across the board. Use it and let us know if any problems arise.
PeterJ Posted - 19 May 2010 : 22:53:27
We found the source of the problem.

In your TimeAxisLabel.dateToASCII method you have the following code:

SimpleDateFormat formatter
= new SimpleDateFormat (sformatstring);

It does not respect the plot's timezone so we added the following line
formatter.setTimeZone(tDate.getTimeZone));

We now have time axis labels displayed in the timezone of our input calendar.

We cannot add the 7 hours as we don't always know what timezone our user will be in. The plots always have to present time axis labels in GMT.

Any chance of investigating and fixing this method as we don't want to have to maintain a patch?
quinncurtis Posted - 19 May 2010 : 19:03:58
As far as we know, you MUST set the time values as they would be in GMT, and not expect the GregorianCalendar class do any conversion, no matter what you set the time zone to. This is why we said to add 7 hours to the PDT values.
PeterJ Posted - 19 May 2010 : 18:06:58
Thank you.

I'm putting in a Gregorian calendar with the time zone set to TimeZone.getTimeZone("GMT"). However, output is in PDT (my local time zone).
quinncurtis Posted - 19 May 2010 : 15:55:36
The time axis labels are not based on any time zone. Initialize the GregorianCalendar (a Java class) values of your data to GMT and the time axis labels will follow. You can just add 7 hours to your PDT GregorianCalendar values and call it GMT.

for (int i=0; i < timedatevalues.length; i++)
timedatevalues[i].add(Calendar.HOUR,7);


You can't have the raw data in PDT and the time axis labels in GMT. The labels, coordinate system and raw data must all be in the same units.

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07