Change System Date [Mac] using Applescript or Javascript?
Hi All,
Can anyone suggest me how can i change my Mac date using Apple or Java Script.
Is it possible or not? If possible then please suggest.
Shonky
Thanks to all.
Problem solved now .
Here is code.
set oldDate to do shell script "date '+%m:%d:%y'" as string
do shell script "systemsetup setdate 03:03:10"
--Do some stuff
do shell script ("systemsetup setdate " & oldDate)
Shonky
Similar Messages
-
Albe to get a script working on a local machine. Can't on a Remote Mac using AppleScript
Ok I was able to get the following code to work on a local Mac
tell application "FileMaker Pro"
name of every database
end tell
But when I tried to run it on a remote Mac using Applescript
I got a syntax error of: "Expected class name but found identifier"
I tried the following
set RemMac to "eppc://10.1.2.3.4"
set remoteApp to application "FileMaker Pro" of machine RemMac
tell remoteApp
name of every database
end tell
That didn't work, any ideas how I can use 1 Mac to check on another Mac's FileMaker's list of open databases
ThanksThanks Sherry,
This looks like it works perfectly
I am just trying to understand how the times work.
This is the snippet for a two hour maintenance window
$a = Set-WmiInstance -Class CCM_ServiceWindow -Namespace 'ROOT\ccm\Policy\Machine\RequestedConfig' -PutType 'CreateOnly' ` -argument @{PolicySource = 'LOCAL'; PolicyRuleID = 'NONE'; PolicyVersion = '1.0'; Schedules = '1D529B0010080000'; ServiceWindowType = 1; ServiceWindowID = '8fa8c041-b6fc-4e3a-bd91-494af0e7f20d'; PolicyID = '8fa8c041-b6fc-4e3a-bd91-494af0e7f20d'; ` PolicyInstanceID = '8fa8c041-b6fc-4e3a-bd91-494af0e7f20d'}; $a.ServiceWindowID get-wmiobject -query "SELECT * FROM CCM_ServiceWindow" -namespace "ROOT\ccm\Policy\Machine\RequestedConfig"
The things change are 'schedules','ServiceWindowID' , 'PolicyID' and 'PolicyInstanceID' and they seem to change, even when the same time is set e.g. create a 2, 3 hour service windows
Whilst getting the string is easy to work out using client centre. I am really curios to find out how these values translate to 1,2 and 3 hour service windows. The SDK doesn't shed a great deal of light on the subject (well not that I could find)
Regards, Martin -
Changing system date in Paravirtualized Oracle VM
Hi ,
I need 3 guest on 1 oracle VM server. Each of them has own different system date. For example while first one is working on 2041 , second one works on 2001 and last one works on 2014.
I have set "xen.independent_wallclock = 1" in "/etc/sysctl.cfg" in each Guest and I am able to change system date as independently from host system. Until here , everything is ok.
But when I restart the Guest system , the system date is resetting to host system's system date .
Please could you give your ideas how to solve this problem .
Rgds.
Leo-Hi, for paravirtualized guests do like this:
As user root
vi /etc/sysctl.confsearch "independent_wallclock" and set it "=0" (NOT "=1")
Save and exit
Set the correct Time Zone creating an appropriate symbolic link, for example:
ln -sf ../usr/share/zoneinfo/Europe/Rome /etc/localtimeThen:
vi /etc/sysconfig/clockSet it as you like, but following this schema:
ZONE="Europe/Rome"
UTC=false
ARC=false("ZONE" refers to the Time Zone, "UTC=false" indicates that LOCAL TIME will be used)
Finally, deactivate the ntpd service on your VM guest, as with the above settings system time will be bound to the Hardware Clock on Dom0, therefore we don't need ntpd:
chkconfig --del ntpd
service ntpd stopTry a reboot and check all is ok.
All this, I repeat, is true for Paravirtualized guests only. Fully Virtualized guests do need ntpd service for system tyme sync.
HTH -
Can we change system date from sql prompt
hi everyone
can someone tell if we can change the system date from the sql
prompt??
Tariq.I don't think that the date/time last modified is accessible. You could use the SummaryInfo of the report to maintain this information yourself. This is part of the RAS SDK. There is a comments section available that you could use for this.
-
Changing system date in a HVM DomN
Hi ,
the changed sytem date in a HVM DomN does not stay persistent after restarting virtual machine.
same problem is also exist in PVM DomN in a different mannger which I had already opened a different thred for it.
1. Create a HVM DomN
2. login into HVM DomN
3. set wallclock
xen.independent_wallclock = 1
4. restart HVM DomN
5. login into HVM DomN
6. set system date to 07/07/2030
*[root@bcvlnx12 ~]# date -s '07/07/2030'*
Sun Jul 7 00:00:00 CEST 2030
*[root@bcvlnx12 ~]# date*
Sun Jul 7 00:00:03 CEST 2030
*[root@bcvlnx12 ~]#*
7. check if ntpd disabled
*[root@bcvlnx12 ~]# chkconfig --list ntpd*
ntpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
8. restart DomN as root
*[root@bcvlnx12 ~]# shutdown -r -t 0 now*
Broadcast message from root (pts/1) (Sun Jul 7 00:05:20 2030):
The system is going down for reboot NOW!
9. login again as root after restart
Last login: Wed Apr 21 11:10:01 2010 from pcmuc014.bc.int
*[root@bcvlnx12 ~]# date*
Mon Jul 8 02:06:33 CEST 2030
*[root@bcvlnx12 ~]#*
10. system date is persist
11. Login into Oracle VM manager web interface and power off Dom N
12. Login into Oracle VM manager web interface and power ON Dom N
13. login into DomN
Last login: Mon Jul 8 02:06:29 2030 from pcmuc014.bc.int
*[root@bcvlnx12 ~]# date*
Wed Apr 21 11:30:04 CEST 2010
so , system date which has been ser by root user in step 6 is lost and become same as with Dom0
Any idea ? any fix ?
Rgds.
Leo Frühling.Hi, for paravirtualized guests do like this:
As user root
vi /etc/sysctl.confsearch "independent_wallclock" and set it "=0" (NOT "=1")
Save and exit
Set the correct Time Zone creating an appropriate symbolic link, for example:
ln -sf ../usr/share/zoneinfo/Europe/Rome /etc/localtimeThen:
vi /etc/sysconfig/clockSet it as you like, but following this schema:
ZONE="Europe/Rome"
UTC=false
ARC=false("ZONE" refers to the Time Zone, "UTC=false" indicates that LOCAL TIME will be used)
Finally, deactivate the ntpd service on your VM guest, as with the above settings system time will be bound to the Hardware Clock on Dom0, therefore we don't need ntpd:
chkconfig --del ntpd
service ntpd stopTry a reboot and check all is ok.
All this, I repeat, is true for Paravirtualized guests only. Fully Virtualized guests do need ntpd service for system tyme sync.
HTH -
Consequences of changing system date
for some reason i need to change the system date on production server (sms server with a database)
only the year should decrease by two (minus 2 years)
before changing the date i want to get some advice from the community
what problems could happen after that, what steps should i follow before doing that, etc
the things that i've already taken care of are CRON and AT jobs
i think there could be problems with file access/modification dates and anything that relies on them
can it be solved by just updating access/modification dates of all files accordingly?
please give advice
thanks in advancerobmaloy wrote:
i'd wonder what happens if your server sends 2 year old SMS to the SMSC and receives SMS dating 2 years in the future :>
consider buying a new license
that kind of problems wont happen since new outgoing messages are selected using different/additional criteria
moreover it's not only about this particular case
it's a real problem, i would be interested to get some (new) advices even i decide to buy new license -
Change system date??
Hi,
I just wonder if we can refresh the B1 after we change the system date in the OS without restarting the B1 application itself.. because restarting the B1 take quite a time for my laptop...
Actually there was once i tried to lock screen the application, when i logged in back, the date was refreshed, but i can't do that anymore and i don't know why that day i could.
Thanks,
MartinMartin,
The SAP client at the time of login takes the system date and I don't think there is any way to refresh without loging out and loging back in
Suda -
How to use AppleScript, Safari, JavaScript, and jQuery together
Hello to all,
I am running AppleScript to populate some forms on various websites, but to activate some behaviors on the various forms that I can't activate with Safari and JavaScript I think I might need jQuery. Only problem is that I don't really know how to get the functions of jQuery embedded into a running AppleScript.
Would any of you knowledgeable people know how to accomplish this.
Any help would be welcome.
Thank you,
ChrisYes I did get to that part.... I went trough external to retrive itunes folder... When I selected the folder, it said that it was locked, choose another folder... I then went to my external again to my itunes folder and and used command I to see if folder was locked and it wasn't.... it was suggested on another forum to reboot.. which I did and still same problem... All I want to do is link my external hard drive that has my itunes playlist from another Mac to my new one.. and to also use the external as the main source for adding new songs to my playlist...
-
Unable to change system date format
Dear All,
We are working with ESO 5.1.08.
Whenever a mail is sent out to suppliers, it contains US date format. We want to change it to UK date format i.e. from MM-DD-YY HH:MM am/pm to DD-Mon-YY HH:MM am/pm.
Any pointers would be highl helpful.
Regards,
TriptiHi Tripti,
Check these properties by login as "System" , setup -> System Properties -> system.default.timezone and system.master_timezone are set to UK .
let me know if it helps.
Thanks
Sai -
Character value changed to date when using desformat = SPREADSHEET
I'm running reports on application server 10.1.2.0.2, and have a problem with formatting when printing to excel (desformat = SPREADSHEET). I have a character-field with the value 12.1, and when I print this, excel transforms it to 12.jan. Excel thinks this is a date-column. I have tried to add chr(39) on each side of the value, to force excel to print this value as character, but then it is displayed like this: '12.1'
Does anyone have a similar problem? How can I force excel to display this as a character field with the value 12.1?
Marit.Is there any suggestion for excel not to trim white spaces from string.
ex "Day 1"
"nbsp;nbsp; Data1"
"nbsp;nbsp; Data2"
while using spreadsheet formatting all the leading spaces are trimmed off.
thanks
senthil; -
Hi,
I have a 11.2 database + oracle EBS on a linux machine with a wrong date time. What will happen to database and ebs if I change the time an hour back from actual?Please read following discussion for special cases Re: Impact on changing DATE
-
Changing "from" in mail using applescript
I am trying to send a notification email from script when it reaches a certain point.
but i would like the from address to read something like "[email protected]" instead of my email address.
here is the code I am using to send the mail
to sendTheMail(mailRecp,mailSubject,mailBody)
tell application "Mail"
set theNewMessage to mail new outgoing message with properties{subject:mailSubject,content:mailBody,visible:false}
tell theNewMessage to recipient at end of recipients with properties{address:mailRecp}
end tell
end tell
end sendTheMail
Where can I put the line to override the from address?
I can't seem to find any information on that.
Thanks,
PendalThis is quite simple.
FIrst, though, you have to have an account configured in Mail with the email address you want to use - you don't have to enable Checking for that account, but it must exist. Then you can just:
to sendTheMail(mailRecp, mailSubject, mailBody)
tell application "Mail"
set theNewMessage to make new outgoing message with properties {subject:mailSubject, content:mailBody, visible:true}
tell theNewMessage
make new recipient at end of to recipients with properties {address:mailRecp}
set sender to "[email protected]"
end tell
end tell
end sendTheMail -
Set level for bookmarks using applescript or javascript
hi everyone!
In my indesign document having 3 paragraphs. And set bookmarks of level one by one to these paragraphs.
Please anyone can help me?
tell application "adobe indesign cc 2014"
tell active document
set selectItem to item 1 of selection
set textdestinate to make hyperlink text destination with properties {name: selectItem, destination text:item 1 of selection}
set BknameInnerItem to make new bookmark with properties {destination:textdestinate}
end tell
end tell
--Then, how to set bookmark level in the hyperlink text destination properties? Is it possible?To add a new level, add a bookmark to another bookmark; that will automatically indent it.
-
How to change the date of a file on mac
I have a bunch of videos taken from a Sony digital camera around 2006 2007 that I took from my windows pc and copied to my Mac but they all read 2010 now, creation date and modified date ?
How can I change these dates and which one do I change,? ThanksPeruse the hits from a google search for *change modification date mac*.
-
System data change....
Hi all,
when I log in my XI server says "License expiration data:01-11-2008(in 9 days)
I know that I have to change the system date, but I need to know procedure
to be followed before changing system date.
Pl. help me out.
Regards,
Pankaj.Hello Pankaj,
This means that you need to apply for license and not change system date.Please apply for license.
Of course changing system date will make this problem not re occur but then such system will not be supported by SAP.
Regards.
Ruchit.
Maybe you are looking for
-
I just signed up for icloud. I previously had itunes on my old computer.When I went to sign up to icloud it told me my password was wrong so I changed it. When I went to sign into icloud (after installed) It told me I have to log in using my Apple
-
I'm importing an XML file, using the Import XML menu item, using InDesign CS4. In the document I've got a table, with an XML structure in the structure tree, matching in the incoming file. Everything works fine, except that after the 4 "template rows
-
Hello, For mapping , in which table can we find the supplier item corresponding to the customer item. Thanks Regards Swathi.
-
Issue Airport TC and Airport Express wifi
Hello, Any help much appreciated for this configuration that doesn't work: I have the following conf connected via cable: ISP modem --> NetGear Router FVS338 --> Airport TC + Airport Express () + NAS (qnap) The Airport TC is plugged via the WAN port
-
Is it possible to put a title on top of the page in a contact sheet on Iphoto?