.\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992 .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" Modified by Michael Haardt .\" Modified 1993-07-24 by Rik Faith .\" Modified 2001-03-16 by Andries Brouwer .\" Modified 2004-05-27 by Michael Kerrisk .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya .\" all rights reserved. .\" Translated 1997-03-03, HANATAKA Shinya .\" Updated 2001-04-10, Kentaro Shirakata .\" Updated 2003-09-08, Kentaro Shirakata .\" Updated 2005-02-24, Akihiro MOTOKI .\" .TH STIME 2 2010\-02\-25 Linux "Linux Programmer's Manual" .SH 名前 stime \- 時間を設定する .SH 書式 \fB#include \fP .sp \fBint stime(time_t *\fP\fIt\fP\fB);\fP .sp .in -4n glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp \fBstime\fP(): _SVID_SOURCE .SH 説明 \fBstime\fP() はシステムの時刻と日付を設定する。 \fIt\fP が指す時刻は、時刻紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) からの秒数で指定する。 スーパーユーザーのみが \fBstime\fP() を実行できる。 (訳注: 正確にはグリニッジ平均時(GMT)ではなく協定世界時(UTC)が使用される) .SH 返り値 成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。 .SH エラー .TP \fBEFAULT\fP ユーザー空間から情報を得るときにエラーが発生した。 .TP \fBEPERM\fP 呼び出し元のプロセスが十分な権限を持っていない。 Linux では \fBCAP_SYS_TIME\fP 権限が必要である。 .SH 準拠 SVr4. .SH 関連項目 \fBdate\fP(1), \fBsettimeofday\fP(2), \fBcapabilities\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.65 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。