• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: getting file creation date from NTFS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting file creation date from NTFS


  • Subject: Re: getting file creation date from NTFS
  • From: Alastair Houghton <email@hidden>
  • Date: Sun, 23 May 2010 22:07:47 +0100

On 23 May 2010, at 21:21, Paul Sanders wrote:

>> On sensible platforms, stat() returns UTC, as you'd expect.
>
> That statement I can now verify by experiment (which is good as I assumed that when I wrote the code).  The docs do not say.

OS X conforms to the SUSv3 specification, which says explicitly in the documentation for <sys/stat.h>:

"Times shall be given in seconds since the Epoch."

The docs don't really *have to* say, though, because it's the only choice that makes any sense.  The behaviour on Windows is obviously wrong---imagine what might happen if you read a time from the filesystem, then the user changes the time zone, *then* you convert it from local time to UTC, but using the *wrong* local time!  You can't even remember which time zone you were in before reading the time, because the user could change it between you remembering it and you reading the time.

Kind regards,

Alastair.

--
http://alastairs-place.net



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: getting file creation date from NTFS
      • From: "Paul Sanders" <email@hidden>
References: 
 >Re: getting file creation date from NTFS (From: "Paul Sanders" <email@hidden>)

  • Prev by Date: Re: getting file creation date from NTFS
  • Next by Date: Re: how to bring up a keyboard as in UITextField
  • Previous by thread: Re: getting file creation date from NTFS
  • Next by thread: Re: getting file creation date from NTFS
  • Index(es):
    • Date
    • Thread