Loading ...
Sorry, an error occurred while loading the content.

58257AW: Localtime DST / TZ question

Expand Messages
  • Denis Banovic
    Apr 2, 2004
      Hi Trond,

      Thanks for this solution, actually I'm using Class::Date module which uses the POSIX library for Date calculations, and normally it works great, except under mod_perl...
      And extra calling of DateTime only to find out if the TimeZone settings are correct is a bit too slow I think. (I'm creating up to 100 date objects per request )

      Is there any other way to tell mod_perl which time_zone to take?



      -----Urspr√ľngliche Nachricht-----
      Von: Trond Michelsen [mailto:trondmm-modperl@...]
      Gesendet: Freitag, 2. April 2004 16:11
      An: Denis Banovic
      Cc: modperl@...
      Betreff: Re: Localtime DST / TZ question

      On Fri, Apr 02, 2004 at 09:48:11AM +0200, Denis Banovic wrote:
      > Can somebody please tell me, how to tell mod_perl to use a different time zone?

      I prefer the DateTime module.

      use DateTime;

      my $dt = DateTime->now(time_zone => "Europe/Oslo");
      print $dt->strftime("%a, %d %b %Y %H:%M:%S %z")'

      Fri, 02 Apr 2004 16:04:28 +0200

      This module takes care of both timezones and DST

      Trond Michelsen

      Report problems: http://perl.apache.org/bugs/
      Mail list info: http://perl.apache.org/maillist/modperl.html
      List etiquette: http://perl.apache.org/maillist/email-etiquette.html
    • Show all 2 messages in this topic