stimeのヘルプ・マニュアル
日本語 英語
stime --help
man stime
STIME(2) Linux Programmer’s Manual STIME(2)
名前
stime - 時間を設定する
書式
#include
int stime(time_t *t);
glibc 向けの機能検査マクロの要件 (feature_test_macros(7) 参照):
stime(): _SVID_SOURCE
説明
stime() はシステムの時刻と日付を設定する。 t には時刻をグリニッジ平均
時(GMT)の 1970年1月1日 00時00分00秒 からの経過秒数で指定する。スーパ ー
ユーザーのみが stime() を実行できる。
( 訳 注: 正確にはグリニッジ平均時(GMT)ではなく協定世界時(UTC)が使用され
る)
返り値
成功した場合はゼロが返される。エラーの場合は -1 が返され、 errno が適切
に設定される。
エラー
EFAULT ユーザー空間から情報を得るときにエラーが発生した。
EPERM 呼 び 出 し 元のプロセスが十分な権限を持っていない。 Linux では
CAP_SYS_TIME 権限が必要である。
準拠
SVr4.
関連項目
date(1), settimeofday(2), capabilities(7)
Linux 2007-07-26 STIME(2)
STIME(2) Linux Programmer’s Manual STIME(2)
NAME
stime - set time
SYNOPSIS
#include
int stime(time_t *t);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
stime(): _SVID_SOURCE
DESCRIPTION
stime() sets the system’s idea of the time and date. Time, pointed to
by t, is measured in seconds from 00:00:00 GMT January 1, 1970.
stime() may only be executed by the superuser.
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is
set appropriately.
ERRORS
EFAULT Error in getting information from user space.
EPERM The calling process has insufficient privilege. Under Linux the
CAP_SYS_TIME privilege is required.
CONFORMING TO
SVr4.
SEE ALSO
date(1), settimeofday(2), capabilities(7)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2007-07-26 STIME(2)