datetime question

Philippe Martin pmartin at snakecard.com
Wed Apr 19 10:25:43 EDT 2006


:-)

Thanks.

Philippe


Scott David Daniels wrote:

> Jorge Godoy wrote:
>> Philippe Martin wrote:
>> 
>>> I need to get the date and time under Windows and Linux but need the
>>> information visible to the user (cannot find my words) not the sytem
>>> information (ex: a PC setup on greenwich but the date/time displayed are
>>> relative to some other place.
>> 
>> Something like this?
>> 
>>>>> import datetime
>>>>> datetime.datetime.now()
>> ...
> 
> Just so you (Phillipe) know, you are talking about "local time" vs. UTC.
>      >>> import datetime
>      >>> print datetime.datetime.now() # local
>      2006-04-18 15:25:03.140000
>      >>> print datetime.datetime.utcnow() # zulu / utc / gmt
>      2006-04-18 22:25:13.625000
> 
> --Scott David Daniels
> scott.daniels at acm.org




More information about the Python-list mailing list