Fellow Monks:
I would like to know if there is a perl module or subroutine in a given modules that does the following:
Given GMT time and the offset from GMT time in 24 hour format, I need to be able to input the date and time; hours, minutes, date (year,month day), and hour offset such as -5 hours and have it converted to the correct time and date.
Example:
Input: 01:50 01/18/2005 offset -5 hours
Output: 20:50 01/17/2005
Perhaps the code and hypthetical subroutine would look something like this:
#GMT time,date
my($Gyr,$Gm,$Gd,$Gh,$Gm,$offset)=(2006,1,8,1,34,-5);
#subroutine converts to local time, date
#from GMT w/ specified offset
#where convertTZ is "hypothetical subroutine
my($y,$m,$d,$h,$m)=&convertTZ($Gyr,$Gm,$Gd,$Gh,$Gm,$offset);
I am still continuing to search through CPAN. Any insight, wisdom, or a point in the right direction would be greatly appreciated.
Thanks in advance for your help.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.