>
> >
>
> >
>
> 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
Tim Williams (gmail) wrote:
> Using zipfile.Zipfile
>
> How can I add a file to a zip file and keep its date and time correct?
> Currently the date/time change to the time the file was added to the
> zip.Zipinfo doesn't have a write method!
>
> Solutions other than zipfile are welcome, with
When I add files to my .ZIP files using python zipfile module
the date/time that is stored in mine is the one that comes from
the file's attributes. I'm not sure I understand why you think
yours are not.
-Larry Bates
Tim Williams (gmail) wrote:
> Using zipfile.Zipfile
>
> How can I add a file
Thomas Guettler <[EMAIL PROTECTED]> writes:
> Am Wed, 05 Jan 2005 15:08:37 +0100 schrieb Nader Emami:
>
>> L.S.,
>>
>> Could somebody help me how I can get the next format of date
>> from the time module?
>
> I don't understand your question. Do you want to have the next day?
>
> 20041231 --> 200
On 2005-01-05, Nader Emami <[EMAIL PROTECTED]> wrote:
> L.S.,
>
> Could somebody help me how I can get the next format of date
> from the time module?
>
> example: I have to have this time 20050105. It is the next
> attributes of format %Y%m%d.
>
I would use the datetime module:
>>> import date
Am Wed, 05 Jan 2005 15:08:37 +0100 schrieb Nader Emami:
> L.S.,
>
> Could somebody help me how I can get the next format of date
> from the time module?
I don't understand your question. Do you want to have the next day?
20041231 --> 20050101 ?
You can do it like this:
- parse the string with
>>> import time
>>> time.strftime('%Y%m%d',time.localtime())
'20050105'
On Wed, 05 Jan 2005 15:08:37 +0100, Nader Emami <[EMAIL PROTECTED]> wrote:
> L.S.,
>
> Could somebody help me how I can get the next format of date
> from the time module?
>
> example: I have to have this time 20050105. It i
12 matches
Mail list logo