Locale-Sensitive Perl Method
$time = asctime($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst);
Internationalization (I18n) Method Overview
The POSIX::asctime function takes integer values for the current time and date. Then returns
a date string in the format "Fri Jun 2 18:22:13 2000\n\0".
See perl's POSIX function documentation and perllocale for additional
details.
I18n Issues
The date format "Fri Jun 2 18:22:13 2000\n\0", as returned by asctime , is locale specific
to English locales.
Suggested Replacement
Use POSIX::strftime instead.
strftime takes format specifiers describing the date/time format to output. The
specifiers aAbBcpZ are all locale sensitive. Be aware that this locale sensitivity
means that strftime results are not portable. Use the locale sensitive specifiers for
user-displayed results, but numeric specifiers for internal program logic.
Globalyzer will detect this function and report it as an i18n issue. If you have determined that the call
is being handled correctly, you can use Globalyzer's Ignore Comment functionality to ensure that it
isn't picked up in a subsequent scan.
Locale-Sensitive Perl Methods
|