Skip to content

Disabling luxon for date columns #4627

Discussion options

You must be logged in to vote

Hey @maximelebastard! 👋🏻

If you don't use the @column.dateTime() decorator you will be fine.

class User extends BaseModel {
  @column()
  createdAt: string
  
  @column({
    consume: (v: string) => new Date(v),
    prepare: (v: Date) => v.toISOString(), 
  )
  updatedAt: Date
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@maximelebastard
Comment options

@RomainLanz
Comment options

Answer selected by maximelebastard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants