Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FSGetCatalogInfo returns mod dates in a deprecated data type: UTCDateTime



You can guess that if you like, but you didn't say you were using
GetUTCDateTime; you said you were using FSGetCatalogInfo, which is not
deprecated but which uses UTCDateTime.  If you want to use
GetUTCDateTime, then
use what they suggest instead.  If you want to use FSGetCatalogInfo, then use
the non-deprecated functions in DateTimeUtils.h to do the conversions you need
to the new types.  Similarly, you cannot assume that shorts have been
deprecated because Quickdraw used them for coordinates now that Quickdraw is
deprecated.

Quoting João Varela <email@hidden>:

Gary

If the getter API for UTCDateTime is deprecated I guess we can safely
assume the data type is also deprecated.

See:

/*
  *  GetUTCDateTime()   *** DEPRECATED ***
  *
  *  Deprecated:
  *    use CFTimeZoneGetSecondsFromGMT instead.
  *
  *  Discussion:
  *    This function is no longer recommended. Please use
  *    CFTimeZoneGetSecondsFromGMT instead.
  *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in
CoreServices.framework but deprecated in 10.4
  *    CarbonLib:        in CarbonLib 1.0.2 and later
  *    Non-Carbon CFM:   in UTCUtils 1.0 and later
  */
extern OSStatus
GetUTCDateTime(
   UTCDateTime *  utcDateTime,
   OptionBits     options)

The utilities you mention are just bridges for us to use the
recommended APIs. I know Larry is always warning us how dangerous and
evil assumptions are but I guess my assumption is on the safe side. :)

JV



On 2007/01/18, at 00:29, Gary L. Wade wrote:

It looks like you're assuming that UTCDateTime was deprecated when
it was the
functions in UTCUtils.h that were deprecated.  See DateTimeUtils.h for
non-deprecated functions that operate upon UTCDateTime.

Quoting João Varela <email@hidden>:

Hi Chris, Larry

I knew about converting UTCDateTime to CFAbsoluteTime; that was not
the problem, although I do appreciate the fact that you replied to my
question. What I asked was a way to get rid of UTCDateTime data type
completely by using a more modern API than FSGetCatalogInfo, but I
guess the "deafening silence" concerning my question means there is
none at the moment. :)  Therefore I was planning to use the APIs that
Larry suggested, although it's good to know that you can do that
manually if you wish. :) I could file a bug but I guess Apple is
perfectly aware of that problem when they declared UTCDateTime
deprecated in Tiger. The "deafening silence" is quite  understandable. :)

JV






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >FSGetCatalogInfo returns mod dates in a deprecated data type: UTCDateTime (From: João Varela <email@hidden>)
 >Re: FSGetCatalogInfo returns mod dates in a deprecated data type: UTCDateTime (From: Chris Newman <email@hidden>)
 >Re: FSGetCatalogInfo returns mod dates in a deprecated data type: UTCDateTime (From: Laurence Harris <email@hidden>)
 >Re: FSGetCatalogInfo returns mod dates in a deprecated data type: UTCDateTime (From: João Varela <email@hidden>)
 >Re: FSGetCatalogInfo returns mod dates in a deprecated data type: UTCDateTime (From: João Varela <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.