how can i get system time?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • zelzel.zsu@gmail.com

    how can i get system time?

    Hi, Can I get a system date time?

    I want to get current time, like
    the target string should looks like:
    the output of : `date +"%Y%m%d %H:%M:%S"`

    how can i do this?

    thanks.

  • Mike Meyer

    #2
    Re: how can i get system time?

    "zelzel.zsu@gma il.com" <zelzel.zsu@gma il.com> writes:[color=blue]
    > Hi, Can I get a system date time?[/color]

    time.time()
    [color=blue]
    > I want to get current time, like
    > the target string should looks like:
    > the output of : `date +"%Y%m%d %H:%M:%S"`
    >
    > how can i do this?[/color]
    [color=blue][color=green][color=darkred]
    >>> time.strftime(" %Y%m%d %H:%M:%S")[/color][/color][/color]
    '20051111 02:44:19'[color=blue][color=green][color=darkred]
    >>>[/color][/color][/color]

    <mike
    --
    Mike Meyer <mwm@mired.or g> http://www.mired.org/home/mwm/
    Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

    Comment

    Working...