If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Perl and the DBI > TimeZone problem in perl

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-24-05, 02:03
pangup_74 pangup_74 is offline
Registered User
 
Join Date: Feb 2004
Location: UK
Posts: 43
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
Reply With Quote
  #2 (permalink)  
Old 02-02-06, 23:45
reneeb reneeb is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On