]> git.vomp.tv Git - vompclient.git/commitdiff
Fix some times being 1h out
authorChris Tallon <chris@vomp.tv>
Thu, 18 Aug 2022 14:28:31 +0000 (14:28 +0000)
committerChris Tallon <chris@vomp.tv>
Thu, 18 Aug 2022 14:28:31 +0000 (14:28 +0000)
Recordings start times not in the current timezone would be
displayed as if they were. Caused by MVP legacy code.

src/vdr.cc

index 05a651b51c2797688277f157dba31c25cb2d7d72..fbb7070b5c20628bd2a6001a498f620a1cfffd67 100644 (file)
@@ -683,37 +683,40 @@ bool VDR::doLogin(unsigned int* v_server_min, unsigned int* v_server_max, unsign
   // Set the time and zone on the MVP only
 
 #if !defined(WIN32) && !defined(__ANDROID__)
+
+  /* FIXME make this a config option
   struct timespec currentTime;
   currentTime.tv_sec = vdrTime;
   currentTime.tv_nsec = 0;
-
   int b = clock_settime(CLOCK_REALTIME, &currentTime);
-
   logger->debug(TAG, "set clock = {}", b);
+  */
 
-  // now make a TZ variable and set it
-  char sign;
-  int hours;
-  int minutes;
-  if (vdrTimeOffset > 0) sign = '-';
-  else sign = '+';
+    /* Obsolete
+    // now make a TZ variable and set it
+    char sign;
+    int hours;
+    int minutes;
+    if (vdrTimeOffset > 0) sign = '-';
+    else sign = '+';
 
-  vdrTimeOffset = abs(vdrTimeOffset);
+    vdrTimeOffset = abs(vdrTimeOffset);
 
-  hours = (int)vdrTimeOffset / 3600;
-  minutes = vdrTimeOffset % 3600;
+    hours = (int)vdrTimeOffset / 3600;
+    minutes = vdrTimeOffset % 3600;
 
-  logger->debug(TAG, "{} {} {}", sign, hours, minutes);
+    logger->debug(TAG, "{} {} {}", sign, hours, minutes);
 
-  minutes = (int)minutes / 60;
+    minutes = (int)minutes / 60;
 
-  logger->debug(TAG, "{} {} {}", sign, hours, minutes);
+    logger->debug(TAG, "{} {} {}", sign, hours, minutes);
 
-  char newTZ[30];
-  sprintf(newTZ, "MVP%c%i:%i", sign, hours, minutes);
-  setenv("TZ", newTZ, 1);
+    char newTZ[30];
+    sprintf(newTZ, "MVP%c%i:%i", sign, hours, minutes);
+    setenv("TZ", newTZ, 1);
 
-  logger->debug(TAG, "Timezone data: {}", newTZ);
+    logger->debug(TAG, "Timezone data: {}", newTZ);
+    */
 #endif
 
   setCharset(Osd::getInstance()->charSet());