>
> >
>
> >
>
> http://docs.python.org/2/library/datetime
>
> """ An object of type *time* or *datetime* may be naive or *aware"
>
>
>
> aware refers to time-zone and daylight savings time, such political
>
> ephemerals. Two times can only be changed if one knows they're both in
>
> the
On 12/10/2012 03:52 PM, Steven D'Aprano wrote:
> On Mon, 10 Dec 2012 11:57:37 -0800, noydb wrote:
>
>> I want to compare a user entered date-and-time against the date-and-time
>> of a pdf file. I posted on this (how to get a file's date-time) before,
>> was advised to do it like:
>>
>> import date
On Monday, December 10, 2012 3:52:55 PM UTC-5, Steven D'Aprano wrote:
> On Mon, 10 Dec 2012 11:57:37 -0800, noydb wrote:
>
>
>
> > I want to compare a user entered date-and-time against the date-and-time
>
> > of a pdf file. I posted on this (how to get a file's date-time) before,
>
> > was a
On Mon, 10 Dec 2012 11:57:37 -0800, noydb wrote:
> I want to compare a user entered date-and-time against the date-and-time
> of a pdf file. I posted on this (how to get a file's date-time) before,
> was advised to do it like:
>
> import datetime, os, stat
> mtime = os.lstat(filename)[stat.ST_MT
Found this, and it solved my problem
http://blogs.law.harvard.edu/rprasad/2011/09/21/python-string-to-a-datetime-object/
--
http://mail.python.org/mailman/listinfo/python-list
In <21eb3e6f-9a82-47aa-93ff-8f4083d18...@googlegroups.com> noydb
writes:
> I want to compare a user entered date-and-time against the date-and-time of
> a pdf file. I posted on this (how to get a file's date-time) before, was
> advised to do it like:
> import datetime, os, stat
> mtime = os.ls
I want to compare a user entered date-and-time against the date-and-time of a
pdf file. I posted on this (how to get a file's date-time) before, was advised
to do it like:
import datetime, os, stat
mtime = os.lstat(filename)[stat.ST_MTIME] // the files modification time
dt = datetime.dateti