Rechercher une page de manuel
timegm
Langue: ja
Version: 2001-12-26 (openSuse - 09/10/07)
Section: 3 (Bibliothèques de fonctions)
̾Á°
timegm, timelocal - gmtime ¤È localtime ¤ÎµÕ´Ø¿ô½ñ¼°
#include <time.h> time_t timelocal(struct tm *tm); time_t timegm(struct tm *tm);
ÀâÌÀ
timelocal() ´Ø¿ô¤È timegm() ´Ø¿ô¤Ï¡¢¤½¤ì¤¾¤ì localtime(3) ´Ø¿ô¤È gmtime(3) ´Ø¿ô¤ÎµÕ´Ø¿ô¤Ç¤¢¤ë¡£½àµò
POSIX.1-2001 ¤Ë¤Ï¤Ê¤¤¡£ BSD ·Ï¤Ë¸ºß¤¹¤ë¡£Ãí°Õ
¤³¤ì¤é¤Î´Ø¿ô¤Ï GNU ¤Î³ÈÄ¥¤Ç¤¢¤ë¡£ timelocal() ´Ø¿ô¤Ï POSIX ¤Îɸ½à´Ø¿ô mktime(3) ¤ÈƱ¤¸¤â¤Î¤Ç¤¢¤ë¡£ ¤Î¤Ç¡¢¤³¤ì¤ò»È¤¦Íýͳ¤Ï¤Ê¤¤¤Ï¤º¤Ç¤¢¤ë¡£timegm() ¤ò°Ü¿¢À¤¬¤¢¤ë¤è¤¦¤Ê¤«¤¿¤Á¤Ç¼Â¸½¤¹¤ë¤Ë¤Ï¡¢ TZ ´Ä¶ÊÑ¿ô¤ò UTC ¤ËÀßÄꤷ¤Æ¤«¤é mktime(3) ¤ò¸Æ¤ó¤Ç¡¢ TZ ¤ÎÃͤò¼èÆÀ¤¹¤ì¤Ð¤è¤¤¡£ Î㤨¤Ð¼¡¤Î¤è¤¦¤Ë¤Ê¤ë¤À¤í¤¦¡£
-
#include <time.h> #include <stdlib.h> time_t my_timegm (struct tm *tm) { time_t ret; char *tz; tz = getenv("TZ"); setenv("TZ", "", 1); tzset(); ret = mktime(tm); if (tz) setenv("TZ", tz, 1); else unsetenv("TZ"); tzset(); return ret; }
´ØÏ¢¹àÌÜ
gmtime(3), localtime(3), mktime(3), tzset(3)Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre