[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

AW: AW: change timezone // Zeitzone dndern



Can at least anyone explain to me how i can use a mysql date such like
"YYYY-MM-DD HH:MM:SS" to use in the script below ?

so i want to convert
"2004-01-21 22:46:00" which maybe is GMT
to
"2004-01-21 24:46:00" => MET 

???

thx
stefan

-----Ursprüngliche Nachricht-----
Von: Jonas J Linde [mailto:jonas@init.se] 
Gesendet: Donnerstag, 22. Januar 2004 22:18
An: debian-perl@lists.debian.org
Betreff: Re: AW: change timezone // Zeitzone dndern

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+


-- 
To UNSUBSCRIBE, email to debian-perl-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org



Reply to: