以前のリビジョンの文書です
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in
/mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/parser/handler.php on line
1458
Warning: Declaration of syntax_plugin_note::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in
/mnt/hep_web/hep_web/member/n-kota/dokuwiki/lib/plugins/note/syntax.php on line
79
Warning: Declaration of syntax_plugin_note::render($mode, &$renderer, $indata) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in
/mnt/hep_web/hep_web/member/n-kota/dokuwiki/lib/plugins/note/syntax.php on line
101
Warning: preg_match(): Compilation failed: invalid range in character class at offset 3120 in
/mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/parser/lexer.php on line
118
A PCRE internal error occured. This might be caused by a faulty plugin
====== 時間の扱い ======
----
#include <ctime>
* time_t : 型。環境によるがlong int からのtypedefが多い? UNIX timeを格納するのに使う
* tm : 構造体。
* function
* time_t mktime( struct tm* st_time ) : tm をtime_t (UNIX time)に変換
* struct tm* localtime( const time_t *time ) : time_t から tm に変換(local timeとして)
* struct tm* gmtime( const time_t *time ) : time_t から tm に変換( UTCとして)
* size_t strftime( char* buf, size_t buflen, char* form, struct tm* st_time ) : tmを文字列に変換
* char *strptime(const char *buf, const char *format, struct tm *tm) : 文字列をtmに変換
<code cpp>
time_t StartTime
struct tm* tm_Start = localtime(&StartTime);
char buf[100];
strftime(buf, sizeof(buf), "%Y%m%d", tm_Start);
struct tm tm_A;
char *TimeChar = "3/27/2017-20:00:00";
strptime(TimeString, "%m/%d/%Y-%H:%M:%S", &tm_A);
time_t time = mktime(&tm_A);
</code>