Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    UK
    Posts
    43

    Unanswered: TimeZone problem in perl

    Does any one knows how to covert date of one timezone to other time zone.for example :
    if I have date in EDT like this : Thu Nov 24 02:00:10 EST 2005
    it should get converted into IST like this : 11/24/05 12:30:02
    I have used following but it gives only for "date" ie for unix date command like this :

    my $time = `TZ='India' date +"%D %T %u"`;
    print "$time";


    ~Pankaj

  2. #2
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    167
    You could use one of the many modules on CPAN
    e.g.
    Time::Timezone
    DateTime::TimeZone
    Date::Time
    board.perl-community.de - The German Perl-Community

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •