[uae] Re: Date/time conversion sometimes right, sometimes wrong

  • From: Richard Drummond <evilrich@xxxxxxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Mon, 1 Nov 2004 00:46:37 -0500

Hi Martin

On Saturday 30 October 2004 05:31 pm, Martin Steigerwald wrote:
> All three directory listing should show the exact same dates and times for
> each file. But from what I see this is only true for listing 2 and 3.

I don't think it's possible to get the three to agree.

The problems is that with Amiga filesystems, the date-stamp on a file is 
always interpreted as local time. This is not so on a Unix filesystem; there 
the date-stamp is in UTC.

It would be possible to change the UAE virtual filesystem system so that it 
stamps all files with local times, but this has at least two problems:

1) Performance. Any file modification would require the date-stamp of the host 
file to be changed (just now we rely on the host filesystem to update the 
date-stamp when a file gets modified, but of course that's done in UTC and so 
we'd have to change that to local time) and - not only that - we'd have to 
walk up the file tree modifying the date-stamp of each parent folder.

2) The date-stamps on a file modified in Linux/Unix would not match the 
date-stamps on that file viewed in UAE. 

I don't think there is going to be a perfect solution to this problem. It's a 
question of which compromise you think is best. With the current 
implementation date-stamps match between the host filesystem and UAE. Losing 
that and possibly hurting performance, IMHO, would not be a good idea. 
However, I am open to argument.


Other related posts: