[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
[an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]![]() |
![]() |
![]() |
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
![]() |
![]() |
![]() |
$ cat tid.c #include <stdio.h> #include <time.h> #include <locale.h> int main() { char buf[60]; time_t tid = time (NULL); struct tm *lokaltid = localtime (&tid); setlocale (LC_TIME, ""); printf ("LC_TIME er %s\n", setlocale (LC_TIME, NULL)); strftime (buf, sizeof (buf), "%x", lokaltid); printf ("Foretrukket datoformat (%%x): %s\n", buf); strftime (buf, sizeof (buf), "%X", lokaltid); printf ("Foretrukket tidformat (%%X): %s\n", buf); strftime (buf, sizeof (buf), "%c", lokaltid); printf ("Foretrukket dato og tid-format (%%c): %s\n", buf); return 0; } $ gcc -o tid tid.c $ ./tid LC_TIME er da_DK Foretrukket datoformat (%x): 13-09-2000 Foretrukket tidformat (%X): 12:01:26 Foretrukket dato og tid-format (%c): ons 13 sep 2000 12:01:26 CEST $ Hvad synes I om disse danske tidsformater? Jeg havde foretrukket f.eks.: 2000-09-13 (eller evt. 9.13.2000 eller 9/13-2000) 12.01.26 ons. d. 13. sep. 2000 kl. 12.01.26 CEST -- Byrial http://home.worldonline.dk/~byrial/
![]() |
![]() |
![]() |
||||||||||||
|
||||||||||||||
![]() | ||||||||||||||
|
||||||||||||||
![]() |
![]() |
![]() |