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

Re: Subroutine Question


  • Subject: Re: Subroutine Question
  • From: Marconi <email@hidden>
  • Date: Sun, 18 Apr 2010 22:36:44 -0700

At 5:27 PM -0400 4/18/10, Mark J. Reed sent email regarding Re: Subroutine Question:
What's with all the extra parameters to date? It's very silly to call date to ask it for the current date, then turn around and feed that answer back to a second call of date, saying "hey, give me THIS date instead of the current date, but do it in epoch seconds form!"

All you need is this:

on EpochSeconds()
    do shell script "date +%s"
end EpochSeconds

Oh, my.

Well, I'd searched on line and found the example I'd used as being the way to get seconds since epoch. I thought it looked a bit complicated, but it worked.

Thanks!


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: Subroutine Question (From: Wayne Melrose <email@hidden>)
 >Re: Subroutine Question (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Subroutine Question
  • Next by Date: Re: Subroutine Question
  • Previous by thread: Re: Subroutine Question
  • Next by thread: Re: Subroutine Question
  • Index(es):
    • Date
    • Thread