|
NAMEPOSIX::strftime::Compiler - GNU C library compatible strftime for loggers and serversSYNOPSISuse POSIX::strftime::Compiler qw/strftime/; say strftime('%a, %d %b %Y %T %z',localtime): my $fmt = '%a, %d %b %Y %T %z'; my $psc = POSIX::strftime::Compiler->new($fmt); say $psc->to_string(localtime); DESCRIPTIONPOSIX::strftime::Compiler provides GNU C library compatible strftime(3). But this module will not affected by the system locale. This feature is useful when you want to write loggers, servers and portable applications.For generate same result strings on any locale, POSIX::strftime::Compiler wraps POSIX::strftime and converts some format characters to perl code FUNCTION
METHODS
FORMAT CHARACTERSPOSIX::strftime::Compiler supports almost all characters that GNU strftime(3) supports. But %E[cCxXyY] and %O[deHImMSuUVwWy] are not supported, just remove E and O prefix.A RECOMMEND MODULE
PERFORMANCE ISSUES ON WINDOWSWindows and Cygwin and some system may not support %z and %Z. For these system, POSIX::strftime::Compiler calculate time zone offset and find zone name. This is not fast. If you need performance on Windows and Cygwin, please install Time::TZOffsetSEE ALSO
LICENSECopyright (C) Masahiro Nagano.Format specification is based on strftime(3) manual page which is a part of the Linux man-pages project. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. AUTHORMasahiro Nagano <kazeburo@gmail.com>
Visit the GSP FreeBSD Man Page Interface. |