[BACK]Return to patch-src_lib_libscrobble.cpp CVS log [TXT][DIR] Up to [local] / ports / audio / qtscrobbler / patches

Annotation of ports/audio/qtscrobbler/patches/patch-src_lib_libscrobble.cpp, Revision 1.1

1.1     ! yason       1: $OpenBSD$
        !             2: --- src/lib/libscrobble.cpp.orig       Fri Aug  7 12:25:18 2009
        !             3: +++ src/lib/libscrobble.cpp    Fri Aug  7 13:21:15 2009
        !             4: @@ -187,13 +187,20 @@ Scrobble::Scrobble()
        !             5:      tzset();
        !             6:
        !             7:      // our own copy - returned via get_dst
        !             8: -    is_dst = daylight;
        !             9: +    time_t t = time(0);
        !            10: +    tm *local_tm;
        !            11: +    local_tm = localtime((time(&t), &t));
        !            12: +
        !            13: +    is_dst = local_tm->tm_isdst;
        !            14:      (is_dst)?zonename=tzname[1]:zonename=tzname[0];
        !            15:
        !            16:      if (is_dst < 0)
        !            17:          add_log(LOG_ERROR, "is_dst < 0");
        !            18:
        !            19: -    offset = -(int)timezone;
        !            20: +    struct timezone tz;
        !            21: +    struct timeval tp;
        !            22: +    gettimeofday(&tp, &tz);
        !            23: +    offset = -(tz.tz_minuteswest * 60);
        !            24:
        !            25:  #ifdef altzone // defined in <ctime>, but only recent(ish) POSIX
        !            26:      offset = -(int)altzone;

CVSweb