Skip to content

Commit 4cb87dd

Browse files
authored
Merge pull request #6265 from influxdata/fix/from-unixtime-doc-return-type-26637
Fix misleading from_unixtime documentation about return type
2 parents 1a77ea9 + 49b24ba commit 4cb87dd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

content/shared/sql-reference/functions/time-and-date.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -885,9 +885,10 @@ LIMIT 1
885885

886886
## from_unixtime
887887

888-
Converts an integer to RFC3339 timestamp format (`YYYY-MM-DDT00:00:00.000000000Z`).
889-
Input is parsed as a [Unix nanosecond timestamp](/influxdb/version/reference/glossary/#unix-timestamp)
890-
and returns the corresponding RFC3339 timestamp.
888+
Converts an integer (Unix timestamp in seconds) to a timestamp value.
889+
The underlying result is a timestamp (`Timestamp(TimeUnit::Second, None)`).
890+
If you output query results as JSON (default for the API), CSV, or pretty (default for the CLI), the timestamp is formatted as an ISO 8601 string (`YYYY-MM-DDTHH:MM:SS`, without a timezone indicator).
891+
When output to Parquet, the raw integer value (for example, `1641042000`) is preserved.
891892

892893
```sql
893894
from_unixtime(expression)
@@ -1454,7 +1455,7 @@ SELECT tz(time, 'Australia/Sydney') AS time_tz, time FROM home ORDER BY time LIM
14541455
differ when the input timestamp **does not** have a timezone.
14551456

14561457
- When using an input timestamp that does not have a timezone (the default behavior in InfluxDB) with the
1457-
`AT TIME ZONE` operator, the operator returns the the same timestamp, but with a timezone offset
1458+
`AT TIME ZONE` operator, the operator returns the same timestamp, but with a timezone offset
14581459
(also known as the "wall clock" time)--for example:
14591460

14601461
```sql

0 commit comments

Comments
 (0)