Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
14
Task/System-time/AppleScript/system-time-2.applescript
Normal file
14
Task/System-time/AppleScript/system-time-2.applescript
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
set now to (current date)
|
||||
set GMTOffset to (time to GMT)
|
||||
copy now to epoch
|
||||
tell epoch to set {its day, its month, its year, its time} to {1, January, 2001, 0}
|
||||
set systemTime to now - GMTOffset - epoch
|
||||
|
||||
-- Format output:
|
||||
set offsetStr to GMTOffset div hours * 100 + GMTOffset mod hours div minutes
|
||||
if (GMTOffset < 0) then
|
||||
set offsetStr to " -" & text 3 thru -1 of ((-10000 + offsetStr) as text)
|
||||
else
|
||||
set offsetStr to " +" & text 2 thru -1 of ((10000 + offsetStr) as text)
|
||||
end if
|
||||
return (now as text) & offsetStr & (linefeed & systemTime) & (" seconds since " & epoch & " UTC")
|
||||
Loading…
Add table
Add a link
Reference in a new issue