Question & Answer
Question
Answer
- See more details in AIX Perl Updates and Support for perl.rte
- https://www.ibm.com/support/pages/node/885927
### Tip - Set data ulimit to unlimited to avoid memory errors
# ulimit -d unlimited
# perl64 -MCPAN -e shell
cpan[1]> install Time::Fake
<....> ROSULEK/Time-Fake-0.11.tar.gz /usr/bin/make install -- OK cpan[2]>quit |
# cat tzTest.pl
use POSIX qw(strftime);
my $bdate = strftime "%a %b %e %H:%M:%S %Z %Y", localtime(); print "Before Date Change:\t", $bdate, "\n";
my $adate = strftime "%a %b %e %H:%M:%S %Z %Y", localtime(time+61);
print "After Date Change:\t", $adate, "\n"; |
# perl -MTime::Fake=`perl -e 'use Time::Local; print timelocal(00,00,02,12,02,123), "\n";'` ./tzTest.pl |
The documented example uses the 0-6 array of Perl localtime.
# 0 1 2 3 4 5 6 7 8 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); NOTE:
$month range is 0-11, where January is 0. $year is the number of years since 1900 |
# export TZ=America/Chicago
#perl -MTime::Fake=`perl -e 'use Time::Local; print timelocal(00,59,01,12,02,123), "\n";'` ./tzTest.pl
Before Date Change: Sun Mar 12 01:59:00 CST 2023 After Date Change: Sun Mar 12 03:00:01 CDT 2023 # export TZ=America/Tijuana
# perl -MTime::Fake=`perl -e 'use Time::Local; print timelocal(00,59,01,12,02,123), "\n";'` ./tzTest.pl Before Date Change: Sun Mar 12 01:59:00 PST 2023 After Date Change: Sun Mar 12 03:00:01 PDT 2023 # export TZ=America/Mexico_City
# perl -MTime::Fake=`perl -e 'use Time::Local; print timelocal(00,59,01,02,03,123), "\n";'` ./tzTest.pl Before Date Change: Sun Apr 2 01:59:00 CST 2023 After Date Change: Sun Apr 2 02:00:01 CST 2023 |
SUPPORT |
---|
NOTE: CPAN Modules are not supported by AIX Support. If you have issues with the module, refer to the module support details on the MetaCPAN download page. If you require more AIX time zone assistance, use the following step-by-step instructions to contact IBM to open a case for software with an active and valid support contract. 1. Document (or collect screen captures of) all symptoms, errors, and messages related to your issue. 2. Capture any logs or data relevant to the situation. 3. Contact IBM to open a case: -For electronic support, see the IBM Support Community: 4. Provide a clear, concise description of the issue. 5. If the system is accessible, collect a system snap, and upload all of the details and data for your case. |
Related Information
Was this topic helpful?
Document Information
Modified date:
20 March 2023
UID
ibm16963340