Re: UNIX DATE
Re: UNIX DATE
- Subject: Re: UNIX DATE
- From: Nigel Garvey <email@hidden>
- Date: Mon, 26 Apr 2004 10:53:00 +0100
Paul Berkowitz wrote on Sun, 25 Apr 2004 09:38:40 -0700:
>
On 4/25/04 8:08 AM, "Nigel Garvey" <email@hidden>
>
wrote:
>
>
> Paul Berkowitz wrote on Sat, 24 Apr 2004 16:33:22 -0700:
>
>
>
>> set s to ((date "Friday, December 24, 2004 3:00:00 PM") - (date
>
"Thursday,
>
>> January 1, 1970 12:00:00 AM"))
>
>> set s to my Stringify(s)
>
>> do shell script "date -ur " & s & " \"+ %F %T\""
>
>> --> "2004-12-24 15:00:00"
>
>
>
> It gives " F 15:00:00" on my machine. Changing the last line as follows
>
> seems to work, though:
>
>
>
> do shell script "date -ur " & s & " \"+%Y-%m-%d %T\""
>
>
Which OS? When you check 'man strftime' in Terminal, there's no "%F" listed?
Hi, Paul.
As you guessed later in your post, I have Jaguar. I typed 'man strftime'
into the Terminal window and the reply was 'No manual entry for
strftime'. This reminded me of a discussion last year on
Macscripter.net's Code Exchange, which I've just look up. (It was exactly
a year ago today, as it happens.) Someone else had mentioned the '%F'
parameter, I'd pointed out that it just produced 'F', he'd mentioned 'man
strftime', I'd reported 'no manual entry'. Greg Spence then explained:
"NIgel, 'strftime' is in man3 which is not formatted by default to save
space. There are 9 man files in /usr/share/man/ In order to use the other
man files, you'll need to format them by using the 'catman' command...
% cd /usr/share/man/
% sudo catman 3"
I didn't bother to check it out, as it sounded like even more junk on my
hard drive and the only advantage was the ability to write slower scripts
that only ran on certain systems and were only legible if you were into
'%' symbols. I subsequently forgot about it.
Perhaps man3 comes preformatted in Pather.
NG
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.