Calendar class
Hello,
Im developing an application and I need a PC and a mobile to synchronize based on the time. I instantiate a Calendar object and set in them both the actual date to: 20th of August 2006, 19 hours, 00 minutes, 00 seconds, 00 milliseconds, and when I get the time in milliseconds throug Calendar.getTime().getTime() I got different numbers.
Does anyone knows why and how to solve it? I also set the timezone to "Europe/Paris" in them both but same results are thrown.
Thank you.
The calendar actually "runs".. That means that when you set a time, it will just keep on going from the moment you set it. I have no clue why that is, but it is very anoying! In my oppinion a Calendar should be fixed...
Im not completely sure that calendar objects "runs" once a date is fixed.
I have realized that once Ive set the same date and time on my j2sdk and my j2me applicattion, the number of millis in the latter one is 72000 -> 2 hours more. It doesnt matter the date I set that I always get this difference.
I know that I could just add these milliseconds when I get the time in my desktop applicattion, but I dont like at all that solution.
Any hint?
> I have realized that once Ive set the same date and
> time on my j2sdk and my j2me applicattion, the number
> of millis in the latter one is 72000 -> 2 hours more.
> It doesnt matter the date I set that I always get
> this difference.
Well, If you are in west europe then two hours is exactly the difference to the UTC time at the moment (because of summertime).