Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sqlalchemy postgres timestamp with timezone

from sqlalchemy import Column, DateTime, Integer, MetaData, Table
from sqlalchemy.sql import func

metadata = MetaData()

example = Table('example', metadata,
    Column('id', Integer, primary_key=True),
    Column('date', DateTime(timezone=True), default=func.now())
    )
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sqlalchemy #postgres #timestamp #timezone
ADD COMMENT
Topic
Name
4+2 =