I'm not sure how you would do that. Parse the time with the timezone and see if there is a dst/zone shift nearby and add/remove the change and see if the name matches better, maybe?
/ Mirar
Previous text:
2003-10-15 19:42: Subject: Timezones
Let us start off with two interesting points in time:
Calendar.Second(1067126400);
(1) Result: Second(Sun 26 Oct 2003 2:00:00 CEST)
Calendar.Second(1067126400+3600);
(2) Result: Second(Sun 26 Oct 2003 2:00:00 CET)
I'd like to be able to parse a string reprensetation of these into those same objects, as in (reality bent slightly to desired results):
Calendar.parse("%y-%M-%D %h:%m:%s %z", "2003-10-26 02:00:00 CEST");
(3) Result: Second(Sun 26 Oct 2003 2:00:00 CET)
Calendar.parse("%y-%M-%D %h:%m:%s %z", "2003-10-26 02:00:00 CET");
(4) Result: Second(Sun 26 Oct 2003 2:00:00 CEST)
but the daylight saviness of the zone info isn't taken care of. I have tried to track the internal workings of Calendar to do something about it, but it gets scary quickly. I was kind of hoping for some help. :-)
/ Johan Sundström, Lysator