Ticket #9524: 0001-iso9660-fs-add-on-time-convertion-mistake-fix.patch

File 0001-iso9660-fs-add-on-time-convertion-mistake-fix.patch, 1.0 KB (added by beos_zealot, 11 years ago)
  • src/add-ons/kernel/file_systems/iso9660/iso9660.cpp

    From 4faba3a58af2494ee38884d54cd058bdc85ce89e Mon Sep 17 00:00:00 2001
    From: Gediminas Jarulaitis <beos.zealot@gmail.com>
    Date: Thu, 14 Mar 2013 13:09:59 +0200
    Subject: [PATCH] [iso9660 fs add-on] time convertion mistake fix The time of
     files/dirs is stored in iso9660 fs as localtime (meaning
     that timezone offset from GMT is allready included), so we
     have not to add "tz" value to "time", but subtract it to
     get a true GMT time (what we use internally).
    
    ---
     src/add-ons/kernel/file_systems/iso9660/iso9660.cpp |    2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/add-ons/kernel/file_systems/iso9660/iso9660.cpp b/src/add-ons/kernel/file_systems/iso9660/iso9660.cpp
    index c66ae29..44ba3a9 100644
    a b ConvertRecDate(ISORecDate* inDate, time_t* outDate)  
    10021002            tz |= (-1 << 8);
    10031003
    10041004        if (-48 <= tz && tz <= 52)
    1005             time += tz *15 * 60;
     1005            time -= tz *15 * 60;
    10061006    }
    10071007    *outDate = time;
    10081008    return 0;