The following module was proposed for inclusion in the Module List:
modid: Time::Stamp
DSLIP: Rdpfp
description: Easy readable efficient timestamp functions
userid: RWSTAUNER (Randy Stauner)
chapterid: 3 (Development_Support)
communities:
similar:
Timestamp::Simple Time::Piece DateTime DateTime::Tiny
rationale:
=head1 DESCRIPTION
This module makes it easy to include timestamp functions that are
simple, easily readable, and fast. For simple timestamps perl's
built-in functions are all you need: L<time|perlfunc/time>,
L<gmtime|perlfunc/gmtime> (or L<localtime|perlfunc/localtime>), and
L<sprintf|perlfunc/sprintf>...
Sometimes you desire a simple timestamp to add to a file name or
use as part of a generated data identifier. The fastest and easiest
thing to do is call L<time()|perlfunc/time> to get a
seconds-since-epoch integer.
Sometimes you get a seconds-since-epoch integer from another
function (like L<stat()|perlfunc/stat> for instance) and maybe you
want to store that in a database or send it across the network.
This integer timestamp works for these purposes, but it's not easy
to read.
If you're looking at a list of timestamps you have to fire up a
perl interpreter and copy and paste the timestamp into
L<localtime()|perlfunc/localtime> to figure out when that actually
was.
You can pass the timestamp to C<scalar localtime($sec)> (or
C<scalar gmtime($sec)>) but that doesn't sort well or parse easily,
isn't internationally friendly, and contains characters that aren't
friendly for file names or URIs (or other places you may want to use
it).
See L<perlport/Time and Date> for more discussion on useful
timestamps.
For simple timestamps you can get the data you need from
L<localtime|perlfunc/localtime> and L<gmtime|perlfunc/gmtime>
without incurring the resource cost of L<DateTime> (or any other
object for that matter).
So the aim of this module is to provide simple timestamp functions
so that you can have easy-to-use, easy-to-read timestamps
efficiently.
=head1 SEE ALSO
=for :list * L<perlport/Time and Date> - discussion on using
portable, readable timestamps * L<perlfunc/localtime> - built-in
function * L<perlfunc/gmtime> - built-in function *
L<Timestamp::Simple> - small, less efficient, non-customizable stamp
* L<Time::Piece> - object-oriented module for working with times *
L<DateTime::Tiny> - object-oriented module "with as little code as
possible" * L<DateTime> - large, powerful object-oriented system
enteredby: RWSTAUNER (Randy Stauner)
enteredon: Fri Mar 25 02:00:52 2011 GMT
The resulting entry would be:
Time::
::Stamp Rdpfp Easy readable efficient timestamp functions RWSTAUNER
Thanks for registering,
--
The PAUSE
PS: The following links are only valid for module list maintainers:
Registration form with editing capabilities:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=5f500000_4a2594591ba15e83&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=5f500000_4a2594591ba15e83&SUBMIT_pause99_add_mod_insertit=1
Peek at the current permissions:
https://pause.perl.org/pause/authenquery?pause99_peek_perms_by=me&pause99_peek_perms_query=Time%3A%3AStamp