gt; To: python-list@python.org
>> Subject: Re: formated local time
>> If you want the formatted string, you can use strftime:
>>
>> >>> time.strftime("%Y-%m-%d %H:%M:%S")
>> '2007-11-15 07:51:12'
>
> datetime also has the strftime method
> [mailto:[EMAIL PROTECTED]
> ] On Behalf Of Nikola Skoric
> Sent: Thursday, November 15, 2007 8:20 AM
> To: python-list@python.org
> Subject: formated local time
>
> I have been trying to find appropriate way to do get local time in
> "-mm-dd hh:mm:ss"
On Nov 15, 7:19 am, Nikola Skoric <[EMAIL PROTECTED]> wrote:
> I have been trying to find appropriate way to do get local time in
> "-mm-dd hh:mm:ss" format, but the best I got is this:
> datetime.datetime.fromtimestamp(time.mktime(time.localtime()))
> It seems to me I'm missing a much simpler
9:56 AM
> To: python-list@python.org
> Subject: Re: formated local time
>
> On Nov 15, 7:19 am, Nikola Skoric <[EMAIL PROTECTED]> wrote:
> > I have been trying to find appropriate way to do get local time in
> > "-mm-dd hh:mm:ss" format, but the be
I have been trying to find appropriate way to do get local time in
"-mm-dd hh:mm:ss" format, but the best I got is this:
datetime.datetime.fromtimestamp(time.mktime(time.localtime()))
It seems to me I'm missing a much simpler method, am I?
--
"Now the storm has passed over me
I'm left to drif