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 what time() gives you, or undef if 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, or undef if 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 (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