11-10-2011 03:50 PM - edited 11-10-2011 03:51 PM
"The format of the dates are different based on language. "
Disagree. Didn't we just demonstrate that a long value can be printed in a language independent manner.
"format it as yyyy-DD-mm hh:mm:ss aaa "
So create a String, store it, and you have a consistent date, with no calculations or formatting required.
"doing that I'm experiencing the timezone, dst issues"
Every issue that you have raised has been answered on this Thread.
As I said, look at the method I gave you earlier. If you don't think it works, test to demonstrate the problem and come back. But if you can't demonstrate a problem with it, then it seems reasonable to use that approach doesn't it?
11-10-2011 04:16 PM
Thanks Peter. Where did we demonstrate that a long value can be printed in a language independant manner?
long someTime = HttpDateParser.parse("2010-04-17 08:49:37 ");
Doesn''t seem that I can load a long value into the .parse. Would I need to parse out each piece of the long value to create the string that .parse can use?
Thanks a lot.
11-10-2011 04:34 PM
1) "Where did we demonstrate that a long value can be printed in a language independant manner?"
2) "long someTime = HttpDateParser.parse("2010-04-17 08:49:37 ");"
That was just test data to prove the same date and time was used for both Languages. I could, and probably should have suggested you use
long someTime = 1271494177000L;
The result would have been the same.
3) "Doesn''t seem that I can load a long value into the .parse"
Where did I suggest using Httpparser?
Here is what I recommended you do:
Step 3 converts the time to a String using SimpleDateFormat..
As mentioned before, all the answers are in this Thread. I suggest you reread the posts and make sure you understand what we have been trying to tell you.
11-10-2011 04:40 PM
Thanks a lot everyone. Been wrapped up in this for a couple days now and have just simply confused myself. Will freread through the thread and get this working. Thanks a lot, appreciate all the assistance.