• 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: Setting The System Date/Time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting The System Date/Time


  • Subject: Re: Setting The System Date/Time
  • From: John Stiles <email@hidden>
  • Date: Mon, 21 Aug 2006 16:06:58 -0700

Well, I notice that:

Special Considerations

Only the root user can set the time in Mac OS X.

So at the very least you'd need to authenticate to do this. Seems like a hassle :| And what if the user has set an NTP server...?
Actually, I can see the need to do this, but I can also see a bunch of reasons not to do this :)



On Aug 21, 2006, at 4:02 PM, Drarok Ithaqua wrote:

I'm writing an app that would benefit from being able to change the system date/time, but it seems that we as cocoa programmers aren't meant to do this any more...
From the docs ( http://developer.apple.com/documentation/Carbon/ Reference/Date_Time_an_nt_Utilities/DeprecationAppendix/ AppendixADeprecatedAPI.html#//apple_ref/c/func/SetDateTime )


SetDateTime
Changes the date-time information stored by the system to the specified value, expressed as the number of seconds elapsed since midnight, January 1, 1904. (Deprecated in Mac OS X v10.4. There is no replacement.)



SetTime
Changes the date-time information in the system to the specified value, expressed as a date and time. (Deprecated in Mac OS X v10.4. There is no replacement.)


As these have no replacements, I am led to believe that I shouldn't be doing this. Am I right?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Setting The System Date/Time
      • From: Drarok Ithaqua <email@hidden>
References: 
 >Setting The System Date/Time (From: Drarok Ithaqua <email@hidden>)

  • Prev by Date: Setting The System Date/Time
  • Next by Date: Re: Setting The System Date/Time
  • Previous by thread: Setting The System Date/Time
  • Next by thread: Re: Setting The System Date/Time
  • Index(es):
    • Date
    • Thread