Re: AW: change timezone // Zeitzone ändern
And UnknownX@gmx.de spoke unto the world. And said:
> Hi@ll !
> If i call a script within the following code:
> #!/usr/local/bin/perl
> use DateTime;
> my $dt = DateTime->new( year => 2000, month => 5, day => 10,
> hour => 15, minute => 15,
> time_zone => 'GMT', );
> print $dt->hour."\n";
> $dt->set_time_zone( 'Europe/Berlin' );
> print $dt->hour."\n";
> I need a script which converts GMT time to MET (german time). My problem
> is, that the scipt above results the following:
> 15
> 17
> At this time we only have one hour delay cause its 'winter time'. In
> summer we habe 2 hours where the script above maybe will be correct. Can
> anyone explain me how to get the right time at each time period (summer
> / winter) ?
But at the date you specified (10 May 2000) the time difference was
indeed two hours because of summer time, wasn't it?
--
Jonas J Linde <jonas@init.se> http://www.init.se/~jonas/ +46-707-492496
------------------------------------------------------------------------
GE/IT$ d-() s++: a C++(++++)$ UBVL++(++++)$ P++ L+++$ E++ W++(-) N+ o--
K+ !w(+) O M@ V PS+ PE++(-) Y+ PGP+>++ t 5 X R-@ tv- b+>++ DI D++ G++(-)
e+++ h--(----) r++ y++++ UF+
Reply to: