• 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: Date & Time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Date & Time


  • Subject: Re: Date & Time
  • From: christian vick <email@hidden>
  • Date: Thu, 18 Oct 2001 17:48:24 +0200

on 18.10.2001 17:28 Uhr, Perbix, Michael at email@hidden wrote:

> Is there a way that I can set the date/time in 9.1 to use a network sync via
> an applescript, and ev en trigger a sync if possible? Can I use a Scripting
> addition as opposed to standard additions?


The following script tries to connect to three different network time
servers. If it can't connect to all three, a file date is used.

I need this script because an iMac loses sometimes the date information when
Kickoff has made a hard reboot. Usually the Mac connects to timeserver
automatically if the date is 1904. But the date of this iMac is sometimes
2040 and then it doesn't connect automatically.

You need the application Vremya and the Akua Sweets OSAX. Save as stay-open
script.



property theDateHolderFilePath : "mac hd:TheDateHolder"


on run
try
info for theDateHolderFilePath
set theDate to modification date of result
end try

try
tell application "Vremya"
sync "time.euro.apple.com"
quit
end tell
on error -- couldn't connect?
try
tell application "Vremya"
sync "time.apple.com"
quit
end tell
on error -- couldn't connect?
try
tell application "Vremya"
sync "ptbtime1.ptb.de"
quit
end tell
on error -- couldn't connect?

-- OSAX: Akua Sweets:
try
adjust the clock to (theDate + 300) -- plus the 5
minutes the computer needs to restart (checking disk takes some time).
end try
end try
end try
end try
end run


on idle
set FRef to (open for access file theDateHolderFilePath with write
permission)
write "something to modify this file" to FRef
close access FRef

return 60
end idle



Greetings
cris


References: 
 >Date & Time (From: "Perbix, Michael" <email@hidden>)

  • Prev by Date: Re: Outlook Express Again
  • Next by Date: Re: Outlook Express Again
  • Previous by thread: Date & Time
  • Next by thread: Re: Date & Time
  • Index(es):
    • Date
    • Thread