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. |