DateTi...ectory(3pm)
β¨ NAME β¨
DateTime::Format::Epoch::ActiveDirectory β Active Directory epoch seconds π°οΈπ
okay so bestie, this is the lil module that speaks Active Directory time, and yes it's a whole vibe.
π¦ SYNOPSIS π¦
use DateTime::Format::Epoch::ActiveDirectory;
my $dt = DateTime::Format::Epoch::ActiveDirectory
->parse_datetime( 1051488000 );
DateTime::Format::Epoch::ActiveDirectory->format_datetime($dt);
# 1051488000
my $formatter = DateTime::Format::Epoch::ActiveDirectory->new();
my $dt2 = $formatter->parse_datetime( 1051488000 );
$formatter->format_datetime($dt2);
like, you can go full class-method mode OR make yourself a whole $formatter object, whichever one is giving more main character energy today π
πΈ DESCRIPTION πΈ
This module can convert a DateTime object β or literally any object that can be converted to a DateTime object β into the number of seconds since the epoch used in Microsoft Active Directory. no cap π«Ά
Note: this epoch is defined in the local time zone. which is lowkey unhinged but it's just how it is.
so because of that, these two pieces of code will print the same number of seconds, even though they represent two datetimes 6 hours apart:
$dt = DateTime->new( year => 2003, month => 5, day => 2,
time_zone => 'Europe/Amsterdam' );
print $formatter->format_datetime($dt);
$dt = DateTime->new( year => 2003, month => 5, day => 2,
time_zone => 'America/Chicago' );
print $formatter->format_datetime($dt);
not me thinking about that for way too long π it's giving "time zones? never heard of her." periodt.
π METHODS π
Most of the methods are the same as those in DateTime::Format::Epoch. the only difference is the constructor. iconic, honestly β one tiny little twist and that's the whole personality.
new()β Constructor of the formatter/parser object. It has no parameters. that's it, that's the whole thing, she takes nothing and gives you everything π
π SUPPORT π
Support for this module is provided via the datetime@perl.org email list. See http://lists.perl.org/ for more details. the girlies over there will help you out π
π AUTHOR π
Eugene van der Pijll <pijll@gmx.net>
π COPYRIGHT π
Copyright (c) 2004 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.
β SEE ALSO β
DateTimedatetime@perl.orgmailing list
okay that's the whole page bestie, you ate π β¨
this gem was part of the User Contributed Perl Documentation, and this particular page came from perl v5.34.0, dated 2022-06-13 β mwah, sending you off with that ππ¦π
π¦ 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