For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > July 2005 > Want code to display date in different timezone









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Want code to display date in different timezone
Anil Kumar

2005-07-29, 5:01 pm

Hi friends,

Can you help me out.

I have a program in which the time zone is GMT and the time is displayed
as "Thu, 28 Jul 2005 11:21:17 GMT".

I want to display the time in IST. How can I achieve this in PERL.

Regards,
Anil Kumar Malyala
Wiggins d'Anconia

2005-07-29, 5:01 pm

Anil Kumar, Malyala wrote:
> Hi friends,
>
> Can you help me out.
>
> I have a program in which the time zone is GMT and the time is displayed
> as "Thu, 28 Jul 2005 11:21:17 GMT".
>
> I want to display the time in IST. How can I achieve this in PERL.
>
> Regards,
> Anil Kumar Malyala
>


One option using the DateTime module suite is listed here:

http://datetime.perl.org/faq.html#3...0zone
%3F


Time zones are nasty things. Good luck,

http://danconia.org
Tom Allison

2005-07-29, 10:00 pm

Anil Kumar, Malyala wrote:
> Hi friends,
>
> Can you help me out.
>
> I have a program in which the time zone is GMT and the time is displayed
> as "Thu, 28 Jul 2005 11:21:17 GMT".
>
> I want to display the time in IST. How can I achieve this in PERL.
>
> Regards,
> Anil Kumar Malyala
>


Another option is Date::Parse.
Tim Johnson

2005-07-29, 10:00 pm


The Time::Local module also works well.


-----Original Message-----
From: Tom Allison [mailto:tallison@tacocat.net]=20
Sent: Friday, July 29, 2005 4:03 PM
To: Anil Kumar, Malyala
Cc: beginners@perl.org
Subject: Re: Want code to display date in different timezone

[Tim Johnson] <snip>

Another option is Date::Parse.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com