status-time/time.c
changeset 10 442bed4a072e
parent 1 3e9290bf7249
child 17 5b6294779007
equal deleted inserted replaced
9:96b47c0505b5 10:442bed4a072e
     6 #include <sys/time.h>
     6 #include <sys/time.h>
     7 #include <errno.h>
     7 #include <errno.h>
     8 #include <time.h>
     8 #include <time.h>
     9 
     9 
    10 #include "config.h"
    10 #include "config.h"
       
    11 #ifdef LOCALE
       
    12 #include <locale.h>
       
    13 #endif
    11 
    14 
    12 int
    15 int
    13 main(void)
    16 main(void)
    14 {
    17 {
    15     char buf[129];
    18     char buf[129];
    16     time_t tim;
    19     time_t tim;
    17     struct tm *timtm;
    20     struct tm *timtm;
       
    21 #ifdef LOCALE
       
    22     setlocale(LC_TIME, LOCALE);
       
    23 #endif
    18 
    24 
    19     setenv("TZ", TIMEZONE, 1);
    25     setenv("TZ", TIMEZONE, 1);
    20 
    26 
    21     while (1) {
    27     while (1) {
    22         bzero(buf, sizeof(buf));
    28         bzero(buf, sizeof(buf));