DateTi...h::Unix(3pm)
β¨ NAME β¨
DateTime::Format::Epoch::Unix β bestie, it converts DateTimes to and from Unix epoch seconds. That's it. That's the whole vibe. π
Oh and real quick β this page is from the DateTi...h::Unix(3pm) man page, the Perl doc section, so you know where you are. π«Ά
πΈ SYNOPSIS πΈ
use DateTime::Format::Epoch::Unix;
my $dt = DateTime::Format::Epoch::Unix->parse_datetime( 1051488000 );
# 2003-04-28T00:00:00
DateTime::Format::Epoch::Unix->format_datetime($dt);
# 1051488000
my $formatter = DateTime::Format::Epoch::Unix->new();
my $dt2 = $formatter->parse_datetime( 1051488000 );
$formatter->format_datetime($dt2);
Look at that. Clean. Iconic. Two directions, one module. π₯
π DESCRIPTION π
Okay so here's the tea, bestie: this module takes a DateTime object β or honestly any object that can be converted to a DateTime object, it's not picky β and turns it into the number of seconds since the Unix epoch. And yes, it goes the other way too. No cap. π
It's giving "tiny but mighty." π¦
π METHODS π
Most of the methods are literally the same</> as the ones in DateTime::Format::Epoch. The only difference? The constructor. That's the plot twist. π
new()β the constructor for the formatter/parser object. It has no parameters. Zero. None. She doesn't want them. π
π SUPPORT π
Need help? Support for this module comes through the datetime@perl.org email list. Go peek at http://lists.perl.org/ for more details. The people there are nice, I promise. π«Ά
π AUTHOR π
Eugene van der Pijll <pijll@gmx.net> β the icon who made this. Respect. π
β COPYRIGHT β
Copyright (c) 2003 Eugene van der Pijll. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Slay. β¨
π SEE ALSO π
DateTimeβ the main character, obviously. π- the
datetime@perl.orgmailing list β your group chat for datetime emergencies. π
okay that's the whole page, mwah π This was DateTi...h::Unix(3pm) from perl v5.34.0, dated 2022-06-13 β love that for us. go forth and convert timestamps, bestie. π¦β¨π
π¦ where this page comes from
- debian bookworm: libdatetime-format-epoch-perl 0.16-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdatetime-format-epoch-perl 0.16-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdatetime-format-epoch-perl 0.16-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdatetime-format-epoch-perl 0.16-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdatetime-format-epoch-perl 0.16-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms