- Subject: Re: Question about sprintf
- From: "John E. Davis" <davis>
- Date: Mon, 25 Nov 2002 21:07:53 -0500
Morten Bo Johansen <mojo@xxxxxxxx> wrote:
>I suppose I need to call the "date" command for this? I tried
>
> run_shell_cmd (sprintf ("date +%Y-%m-%d %H:%M"));
Use the localtime function, which returns a structure that you can use
to write the data in any format that you want. See
$JED_ROOT/lib/chglog.sl for an example of its use.
>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?
The gmtime function returns the time in GMT. You can probably use it
and localtime to figure out the timezone offset.
Good luck,
--John
--------------------------
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]