date-time comparison, aware vs naive

noydb jenn.duerr at gmail.com
Mon Dec 10 22:20:51 CET 2012


> 
> >
> 
> >
> 
> 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 same one, or if one knows precisely what each is.
> 
> *
> 
> naive assumes the former, while aware trusts the latter.
> 
> 
> 
> 
> 
> To the OP:  please specify your python version, your OS, and show your
> 
> source. Also show the complete error traceback.  And while you're at it,
> 
> it might be useful to know the type of drive the file is on, since
> 
> Windows uses local times on FAT32 partitions, and gmt on NTFS  partitions.
> 
> 
> 
> I suspect you're on Windows, so I can't help you with this nonsense.  But I can at least help you ask a clear question.
> 
> 
> 
> -- 
> 
> 
> 
> DaveA

Fair enough, thanks



More information about the Python-list mailing list