title: PostgreSQL with TypeORM error "syntax error at or near \"Sep\""
body: <p>Error message when trying to make a post from graphQL, apparently it's a syntax error and I am not too familiar with SQL so I do not know what the error is. I am also using TypeORM so I don't know how a syntax error can occur here.</p>
  <pre><code>&quot;query&quot;: &quot;INSERT INTO \&quot;post\&quot;(\&quot;title\&quot;, \&quot;text\&quot;, \&quot;points\&quot;, \&quot;creatorId\&quot;, \&quot;createdAt\&quot;, \&quot;updatedAt\&quot;) VALUES ($1, $2, DEFAULT, DEFAULT, Sat Sep 05 2020 15:49:01 GMT+0200 (Central European Summer Time), Sat Sep 05 2020 15:49:01 GMT+0200 (Central European Summer Time)) RETURNING \&quot;id\&quot;, \&quot;points\&quot;, \&quot;createdAt\&quot;, \&quot;updatedAt\&quot;&quot;,
  </code></pre>
  <p>and this is the error messge:
  &quot;message&quot;: &quot;syntax error at or near &quot;Sep&quot;&quot;,</p>
  <p>The error occurs when using INSERT INTO and the error says it occurs at the word &quot;Sep&quot; so apparently something is wrong with the date or something although I don't understand how that makes sense.</p>
  <p><strong>This is the post resolver</strong></p>
  <pre><code>@ObjectType()
  @Entity()
  export class Post extends BaseEntity {
    @Field()
    @PrimaryGeneratedColumn()
    id!: number;
  
    @Field()
    @Column()
    title!: string;
  
    @Field()
    @Column()
    text!: string;
  
    @Field()
    @Column({ type: &quot;int&quot;, default: 0})
    points!: string;
  
    @Field()
    @Column()
    creatorId: number;
  
    @ManyToOne(() =&gt; User, (user) =&gt; user.posts)
    creator: User;
  
    @Field(() =&gt; String)
    @CreateDateColumn()
    createdAt = Date;
  
    @Field(() =&gt; String)
    @UpdateDateColumn()
    updatedAt = Date;
  }
  </code></pre>
  <p><strong>This is the mutation</strong></p>
  <pre><code>@Mutation(() =&gt; Post)
    async createPost(@Arg(&quot;input&quot;) input: PostInput,
    @Ctx() {req}: MyContext): Promise&lt;Post&gt; {
      return Post.create({ 
        ...input,
        creatorId: req.session!.userId,
       }).save();
    }
  </code></pre>