Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug: create a date field, but the database corresponding type is varchar #6185

Closed
1 task done
bfansheng opened this issue Aug 16, 2023 · 3 comments 路 Fixed by #6325
Closed
1 task done

馃悰 Bug: create a date field, but the database corresponding type is varchar #6185

bfansheng opened this issue Aug 16, 2023 · 3 comments 路 Fixed by #6325
Milestone

Comments

@bfansheng
Copy link

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Steps to reproduce ?

db: mysql 5.7.33
version: 0.109.7

  1. create a date field
    image
  2. but in the database, the type is varchar
    image

Desired Behavior

in the database, the type is also date

Project Details

Node: v16.20.1
Arch: x64
Platform: linux
Docker: true
RootDB: sqlite3
PackageVersion: 0.109.7

Attachments

No response

@o1lab o1lab assigned wingkwong and unassigned o1lab Aug 16, 2023
@wingkwong wingkwong added the 馃殽 Status: On Hold Something is blocking the progress. label Aug 21, 2023
@wingkwong
Copy link
Member

Some notes:

  • changing to date will result in a difference of 1 day between UI & DB
  • need to check with the timezone

@sheldon-welinga
Copy link
Contributor

Some notes:

  • changing to date will result in a difference of 1 day between UI & DB
  • need to check with the timezone

@wingkwong could you assist with steps to follow to reproduce the day difference issue

@wingkwong wingkwong removed their assignment Sep 6, 2023
@wingkwong
Copy link
Member

wingkwong commented Sep 6, 2023

@sheldon-welinga you can do the following

  • create a date field, double check show more to change the type to date
  • input a record (choose today, e.g. 2023-09-07)
  • in nocodb, it shows 2023-09-07 while in DB the value stores as 2023-09-06

UPD: I think the value is correct. I was using DBeaver with UTC timezone while the UI renders in my local timezone. If I use varchar, then it shows as it is. If I use date, then the value is stored in UTC.

For this issue, I think we can either

  • deprecate other types
  • or keep the existing types but setting date by default

@wingkwong wingkwong removed the 馃殽 Status: On Hold Something is blocking the progress. label Sep 6, 2023
@wingkwong wingkwong added this to the 0.111.5 milestone Sep 13, 2023
dstala added a commit that referenced this issue Sep 13, 2023
NCDBOSS-77 - 馃悰 Bug: create a date field, but the database corresponding type is varchar #6185
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants