• Ben Avison's avatar
    Fixed timestamping · 0dbabf61
    Ben Avison authored
    Detail:
      Renamed function "localTIME" to "get_RISCOS_TIME" since it has nothing to do
      with local time. This function used to call the C library function
      localtime(), but until recently the C library was non-conformant to the
      C standard, and simply produced a year/month/day/hour/minute/second breakdown
      as UTC. When this was fixed (RISC_OSLib 5.68) it changed DOSFS's behaviour;
      it was first detected because the reverse operation is implemented locally
      within DOSFS, so a read-modify-write of file attributes leads to the
      modification time being skewed by an amount equal to the difference between
      UTC and local time. Arguments can be made either to treat the on-disc time as
      local time (for compatibility with Windows and Mac OS) or as UTC (for
      compatibility with Linux or older RISC OS systems); I have opted to return
      behaviour to UTC. Also placed a lower limit on dates of the earliest date
      supported by FAT (1980), so for example if your system clock is set to 1970,
      as it will be if there is no RTC and NetTime is not operational, then you
      don't end up creating dates in the far future due to underflow.
    Admin:
      Tested on a beagleboard
    
    Version 0.90. Tagged as 'DOSFS-0_90'
    0dbabf61
DOSFS 67.9 KB