內容

名稱

Net::Time - 時間和日間網路用戶端介面

語法

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');

說明

Net::Time 提供在遠端機器上取得時間的子常式。

函式

inet_time([$host[, $protocol[, $timeout]]])

$host 上取得時間,如果 $host 未提供或未定義,則使用一些預設主機,使用 RFC868 中定義的協定。可選參數 $protocol 應定義要使用的協定,tcpudp。結果將是與 time() 回傳的相同單位時間值,或在失敗時為 undef

inet_daytime([$host[, $protocol[, $timeout]]])

使用 RFC867 中定義的協定,取得 $host 上的時間,或是在未提供或未定義 $host 時使用一些預設主機。選用的引數 $protocol 應定義要使用的協定,可能是 tcpudp。結果會是 ASCII 字串或在失敗時為 undef

匯出

下列符號是由這個模組匯出,或可以由這個模組匯出

預設匯出

.

選用匯出

inet_timeinet_daytime

匯出標籤

.

已知錯誤

.

作者

Graham Barr <gbarr@pobox.com>。

Steve Hay <shay@cpan.org> 目前維護 libnet,版本為 1.22_02。

版權

版權所有 (C) 1995-2004 Graham Barr。保留所有權利。

版權所有 (C) 2014, 2020 Steve Hay。保留所有權利。

授權

這個模組是自由軟體;您可以在與 Perl 相同的條款下重新散布或修改它,亦即在 GNU 通用公共授權或 Artistic 授權的條款下,如 LICENCE 檔案中所指定。

版本

版本 3.15

日期

2023 年 3 月 20 日

歷史

請參閱 Changes 檔案。