alibaba / alibaba/Alibaba-Java-Coding-Guidelines

Guide about date

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
1.1k
Forks
246
PR merge metrics
No merged PRs in 30d

Description

According to

```
9. [Mandatory] A table must include three columns as following: id, gmt_create and gmt_modified.

Note: id is the primary key, which is unsigned bigint and self-incrementing with step length of 1. The type of gmt_create and gmt_modified should be DATETIME.

```

Can I understand that in Alibaba it is recommended to define the date type as DATETIME? If not, shall we add guide about this? TIMESTAMP or DATETIME is the right choice?

We see that it is mandatory to define gmt_create, gmt_modified, can we understand that when dealing with cross time zone issues you recommend storing the date of gmt time in the database and then converting it to local time zone for display?

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test is identified in the issue. First resolve whether the guide should recommend DATETIME or TIMESTAMP and how UTC values should be handled across time zones; done means the guideline contains an unambiguous recommendation and timezone guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.