Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#19440 closed Uncategorized (invalid)

Translate error on p.save() tutorial example

Reported by: michelwilhelm@… Owned by: nobody
Component: Translations Version: 1.4
Severity: Normal Keywords: translate
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Here is the output

p.save()

/usr/lib/python2.7/dist-packages/django/db/models/fields/init__.py:808: RuntimeWarning: DateTimeField received a naive datetime (2012-12-07 00:13:09.773728) while time zone support is active.

RuntimeWarning

On "DateTimeField received a naive" ... Correct is "native"

Change History (2)

comment:1 by Russell Keith-Magee, 12 years ago

Resolution: invalid
Status: newclosed

comment:2 by Simon Charette, 12 years ago

From the datetime documentation.

There are two kinds of date and time objects: “naive” and “aware”.

An aware object has sufficient knowledge of applicable algorithmic and political time adjustments, such as time zone and daylight saving time information,to locate itself relative to other aware objects. An aware object is used to represent a specific moment in time that is not open to interpretation..

A naive object does not contain enough information to unambiguously locate itself relative to other date/time objects. Whether a naive object represents Coordinated Universal Time (UTC), local time, or time in some other timezone is purely up to the program, just like it’s up to the program whether a particular number represents metres, miles, or mass. Naive objects are easy to understand and to work with, at the cost of ignoring some aspects of reality.

Note: See TracTickets for help on using tickets.
Back to Top