jed-users mailing list

[2002 Date Index] [2002 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Question about sprintf


Hi,

I am trying to write a function that will replace a date string
in a file with the current date. The string is in the format:

    2002-11-18 20:45+0100

where "+0100" is the user's timezone.

I suppose I need to call the "date" command for this? I tried

    run_shell_cmd (sprintf ("date +%Y-%m-%d %H:%M"));

and some variations over that but I when calling the function I
just get "invalid format" as the error message. I don't know
what syntax I should use to make it accept it and i am too much
of a programming illiterate to understand the slang docs.

The next question is not really jed related but perhaps someone
could tell me what command could be used to get one's time zone
in the format specified above?



Thanks,

Morten



-- 
"If work was a good thing the rich would have it all and not let you do it."
                                                          (Elmore Leonard)

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2002 date index] [2002 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]