Net::Time(3perl)
π NAME π
okay bestie, gather round, because Net::Time is literally the cutest little time-and-daytime network client interface you ever did see π°οΈβ¨
πΈ SYNOPSIS πΈ
use Net::Time qw(inet_time inet_daytime);
print inet_time(); # use default host from Net::Config
print inet_time('localhost');
print inet_time('localhost', 'tcp');
print inet_daytime(); # use default host from Net::Config
print inet_daytime('localhost');
print inet_daytime('localhost', 'tcp');
like, that's it. that's the whole vibe. three lines and you're asking a whole other computer what time it is π«Ά
π¦ DESCRIPTION π¦
Net::Time hands you subroutines that go ask a remote machine what time it is. no cap, that's the entire plot π
β¨ Functions β¨
inet_time([$host[, $protocol[, $timeout]]])β gets the time on $host. if $host isn't given, or it's undef, you just get some default host instead, no drama π and it does that using the protocol defined in RFC868. the optional $protocol arg tells it which protocol to use, and your options are"tcp"or"udp". what comes back is a time value in the same units as whattime()gives you, orundefif it flopped πinet_daytime([$host[, $protocol[, $timeout]]])β same deal, it gets the time on $host, or some default host if $host isn't given or isn't defined, and it's using the protocol defined in RFC867 this time. the optional $protocol should be either"tcp"or"udp". what you get back here is an ASCII string, orundefif it went sideways π
π EXPORTS π
here's the tea on which symbols this module exports, or could export if you asked nicely:
Default Exports
None. not a one. zero. nada π ββοΈ
Optional Exports
inet_time, inet_daytime. these two are your besties, you just gotta ask for them.
Export Tags
None. nope, not a single tag πΈ
π KNOWN BUGS π
None. literally flawless. icon behaviour. periodt π
π AUTHOR π
Graham Barr <gbarr@pobox.com <mailto:gbarr@pobox.com>>. iconic.
Steve Hay <shay@cpan.org <mailto:shay@cpan.org>> is now maintaining libnet as of version 1.22_02. passing the torch, we love to see it π«Ά
π COPYRIGHT π
Copyright (C) 1995-2004 Graham Barr. All rights reserved.
Copyright (C) 2014, 2020 Steve Hay. All rights reserved.
π LICENCE π
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself, i.e. under the terms of either the GNU General Public License or the Artistic License, as specified in the LICENCE file. slay, legally speaking π
β VERSION β
Version 3.15
π DATE π
20 March 2023
π§ HISTORY π§
See the Changes file. the lore is all in there, go read it bestie π
and that's the whole page!! this is from perl v5.44.0, dated 2026-10-17, and it lives in the manual as Net::Time(3perl) β go forth and ask the internet what time it is, love u, bye πβ¨π¦
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND 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