From a130ff96ba8933c7a760edf9b828fd766fe47ed1 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Fri, 11 Dec 2015 18:48:23 +0100 Subject: [PATCH] #1497 - Using a PHP code block to describe how a datetime+utc type can be set up --- docs/en/cookbook/working-with-datetime.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/en/cookbook/working-with-datetime.rst b/docs/en/cookbook/working-with-datetime.rst index 4272c3a40..67a78b258 100644 --- a/docs/en/cookbook/working-with-datetime.rst +++ b/docs/en/cookbook/working-with-datetime.rst @@ -129,6 +129,20 @@ the UTC time at the time of the booking and the timezone the event happened in. This database type makes sure that every DateTime instance is always saved in UTC, relative to the current timezone that the passed DateTime instance has. +To actually use this new type instead of the default ``datetime`` type, you need to run following +code before bootstrapping the ORM: + +.. code-block:: php + +