logologo
Get Started
Guide
Development
Plugins
API
English
简体中文
Get Started
Guide
Development
Plugins
API
English
简体中文
logologo
Overview

Data sources

Data source manager
Main data source

External data sources (Databases)

Overview
External MySQL
External MariaDB
External PostgreSQL
External MSSQL
External Oracle
Main vs External Databases
REST API data source
KingbaseES data source

Collections

Overview
General collection
Inheritance collection
File collection
Tree collection
Calendar collection
Comment collection
Expression collection
SQL collection
View collection

Collection fields

Overview
Field Validation

Basic

Single text
Long text
Phone
Email
URL
Integer
Number
Percent
Password
Color
Icon

Choices

Checkbox
Select
Multiple select
Radio group
Checkbox group

Media

Markdown
Markdown (Vditor)
Rich text
Attachment (Relationship)
Attachment (URL)

Date & Time

Overview
Date & time (with timezone)
Date & time (without timezone)
Unix timestamp
Date (without time)
Time

Geometry

Point
Line
Circle
Polygon

Advanced

UUID
Nano ID
Sort
Formula
Sequence
JSON
Collection select
Encryption

System info

Created at
Updated at
Created by
Last updated by
Space
Table OID

Associations

Overview
One to one
One to many
Many to one
Many to many
Many to many (array)

Development

Overview
Next PageOverview

#DateTime Field Types

DateTime field types can be categorized as follows:

  • DateTime (with Time Zone): These values are standardized to UTC (Coordinated Universal Time) and are subject to time zone adjustments when necessary.
  • DateTime (without Time Zone): This type stores date and time data without incorporating any time zone information.
  • Date (without Time): This format exclusively stores date information, omitting any time component.
  • Time: Stores only time information, excluding the date.
  • Unix Timestamp: This type represents the number of seconds that have elapsed since January 1, 1970, and is stored as a Unix timestamp.

Here are examples for each DateTime-related field type:

Field TypeExample ValueDescription
DateTime (with Time Zone)2024-08-24T07:30:00.000ZConverted to UTC and can be adjusted for time zones
DateTime (without Time Zone)2024-08-24 15:30:00Stores date and time without time zone considerations
Date (without Time)2024-08-24Captures only the date, with no time information
Time15:30:00Captures only the time, excluding any date details
Unix Timestamp1724437800Represents seconds since 1970-01-01 00:00:00 UTC

#Data Source Comparisons

Below is a comparison table for NocoBase, MySQL, and PostgreSQL:

Field TypeNocoBaseMySQLPostgreSQL
DateTime (with Time Zone)Datetime with timezoneTIMESTAMP
DATETIME
TIMESTAMP WITH TIME ZONE
DateTime (without Time Zone)Datetime without timezoneDATETIMETIMESTAMP WITHOUT TIME ZONE
Date (without Time)DateDATEDATE
TimeTimeTIMETIME WITHOUT TIME ZONE
Unix TimestampUnix timestampINTEGER
BIGINT
INTEGER
BIGINT
Time (with Time Zone)--TIME WITH TIME ZONE

Note:

  • MySQL’s TIMESTAMP type covers a range between 1970-01-01 00:00:01 UTC and 2038-01-19 03:14:07 UTC. For dates and times outside this range, it is recommended to use DATETIME or BIGINT to store Unix timestamps.

#DateTime Storage Processing Workflow

#With Time Zone

This includes DateTime (with Time Zone) and Unix Timestamp.

20240824191933

Note:

  • To accommodate a broader range of dates, NocoBase uses the DATETIME type in MySQL for DateTime (with Time Zone) fields. The date value stored is converted based on the server's TZ environment variable, meaning that if the TZ environment variable changes, the stored DateTime value will also change.
  • Since there is a time zone difference between UTC and local time, directly displaying the raw UTC value could lead to user confusion.

#Without Time Zone

20240824185600

#UTC

UTC (Coordinated Universal Time) is the global time standard used to coordinate and synchronize time worldwide. It is a highly precise time standard, maintained by atomic clocks, and synchronized with the Earth's rotation.

The difference between UTC and local time can cause confusion when displaying raw UTC values. For example:

Time ZoneDateTime
UTC2024-08-24T07:30:00.000Z
UTC+82024-08-24 15:30:00
UTC+52024-08-24 12:30:00
UTC-52024-08-24 02:30:00
UTC+02024-08-24 07:30:00
UTC-62024-08-23 01:30:00

These different times all correspond to the same moment, merely expressed in various time zones.