Re: [sqlalchemy] how to create timestamp without time zone column with postgresql

2018-07-23 Thread Mike Bayer
you should make sure that datetime objects you put in there are against your local UTC time first. On Mon, Jul 23, 2018 at 4:04 PM, Yingchen Zhang wrote: > If set timezone=False, the value should be UTC time ? > I inserted a new line to database , it's used server timezone : PRC > > 在 2018年7月24日星

Re: [sqlalchemy] how to create timestamp without time zone column with postgresql

2018-07-23 Thread Yingchen Zhang
If set timezone=False, the value should be UTC time ? I inserted a new line to database , it's used server timezone : PRC 在 2018年7月24日星期二 UTC+8上午2:10:16,Mike Bayer写道: > > On Mon, Jul 23, 2018 at 2:01 PM, Yingchen Zhang > wrote: > > data type TIMESTAMP just have one param is timezone and it's use

Re: [sqlalchemy] how to create timestamp without time zone column with postgresql

2018-07-23 Thread Mike Bayer
On Mon, Jul 23, 2018 at 2:01 PM, Yingchen Zhang wrote: > data type TIMESTAMP just have one param is timezone and it's use server > timezone setting. > > how to create a `timestamp without time zone` column with postgresql ? > > code: > > Column('created_at', TIMESTAMP(False), nullable=False, > ser

Re: [sqlalchemy] how to create timestamp without time zone column with postgresql

2018-07-23 Thread Ruben Di Battista
What about using DateTime type? _ -. .´ | ', ;|∞∞ ˜˜ |∞ RdB ,.,|∞∞ .' '. | -' `’ http://rdb.is On 23 luglio 2018 a 11:01:10, Yingchen Zhang (cevin.che...@gmail.com) scritto: data type TIMESTAMP just have one param is timez

[sqlalchemy] how to create timestamp without time zone column with postgresql

2018-07-23 Thread Yingchen Zhang
data type TIMESTAMP just have one param is timezone and it's use server timezone setting. how to create a `timestamp without time zone` column with postgresql ? code: Column('created_at', TIMESTAMP(False), nullable=False, server_default=text( 'now()')) -- SQLAlchemy - The Python SQL Toolk