{"action":"opened","issue":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/2845","repository_url":"https://api.github.com/repos/jhipster/generator-jhipster","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/2845/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/2845/comments","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/2845/events","html_url":"https://github.com/jhipster/generator-jhipster/issues/2845","id":132542768,"number":2845,"title":"Improved naming convention for Date vs DateTime object ","user":{"login":"epikuruz","id":656040,"avatar_url":"https://avatars.githubusercontent.com/u/656040?v=3","gravatar_id":"","url":"https://api.github.com/users/epikuruz","html_url":"https://github.com/epikuruz","followers_url":"https://api.github.com/users/epikuruz/followers","following_url":"https://api.github.com/users/epikuruz/following{/other_user}","gists_url":"https://api.github.com/users/epikuruz/gists{/gist_id}","starred_url":"https://api.github.com/users/epikuruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epikuruz/subscriptions","organizations_url":"https://api.github.com/users/epikuruz/orgs","repos_url":"https://api.github.com/users/epikuruz/repos","events_url":"https://api.github.com/users/epikuruz/events{/privacy}","received_events_url":"https://api.github.com/users/epikuruz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-09T21:37:25Z","updated_at":"2016-02-09T21:37:25Z","closed_at":null,"body":"Currently there is no distinction in the naming of fields/columns for Dates and DateTimes(Timestamps)\r\n\r\nI would suggest the following convention change for distinguishing both from one another:\r\n\r\nFor TimeDate use:\r\n\r\nJava:\r\nprivate ZonedDateTime xxxDateTime;\r\n\r\nSQL/DDL:\r\nData type: Timestamp datatype in SQL (relational databases)\r\nand field name xxx_at (e.g. created_at, modified_at)\r\n\r\nFor Date (LocalDate in Java)\r\nprivate LocalDate xxxDate;\r\n\r\nSQL/DDL \r\nData type: Date;\r\nfield name: xxx_date (e.g. created_date)\r\n\r\n\r\n\r\nEXAMPLE:\r\n\r\nBuilt-in entity user now:\r\n\r\n    @Column(name = \"reset_date\", nullable = true)\r\n    private ZonedDateTime resetDate = null;\r\n\r\n\r\nWith the new convention (reset is not a Date as name suggests by DateTime):\r\n\r\n  @Column(name = \"reset_at\", nullable = true)\r\n    private ZonedDateTime resetDateTime = null;\r\n\r\n\r\nWith this convention it is easy to distinguish date types in Java/JS and databases\r\n\r\n "}}