When I serialize date on one pc1 and deserialize it on another pc2 I get local date of pc2.
What will I get when do the same with Calendar instance? Will situation will be same or not?
When I serialize date on one pc1 and deserialize it on another pc2 I
Share
Daterepresents a point in time (number of milliseconds from 1st of January 1970). Do not be confused by the time zone inDate.toString(), you are always serializinglongvalue wrapped in a class.Calendaron the other hand represents date and time in given time zone. This means that if the source computer is in GMT+1 and the target one in the GMT+2, but you are sendingCalendarset to GMT-6, it will be GMT-6 all the way on both sides.That being said it is much safer (and uses less bandwidth) to send
Dateand let every computer display it using local time zone.