Project

General

Profile

Bug #148 » tzfix.patch

Geoffrey McRae -, 2010-05-12 08:41

View differences:

./src/htsp.c 2010-05-12 16:33:43.470666012 +1000
43 43

44 44
#include <sys/statvfs.h>
45 45
#include "settings.h"
46
#include <time.h>
46 47
#include <sys/time.h>
47 48

48 49

......
717 718
{
718 719
  htsmsg_t *out;
719 720
  struct timeval tv;
720
  struct timezone tz;
721 721

722
  if(gettimeofday(&tv, &tz) == -1)
722
  tzset();
723
  if(gettimeofday(&tv, NULL) == -1)
723 724
    return htsp_error("Unable to get system time"); 
724 725

725 726
  out = htsmsg_create_map();
726 727
  htsmsg_add_s32(out, "time", tv.tv_sec);
727
  htsmsg_add_s32(out, "timezone", tz.tz_minuteswest);
728
  htsmsg_add_s32(out, "timezone", timezone / 60);
728 729
  return out;
729 730
}
730 731

(1-1/2)