Merge pull request #6265 from influxdata/fix/from-unixtime-doc-return-type-26637

Fix misleading from_unixtime documentation about return type
influxctl-v2.10.3^2
Jameelah Mercer 2025-08-01 16:44:58 -07:00 committed by GitHub
commit 4cb87dd3dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 4 deletions

View File

@ -885,9 +885,10 @@ LIMIT 1
## from_unixtime
Converts an integer to RFC3339 timestamp format (`YYYY-MM-DDT00:00:00.000000000Z`).
Input is parsed as a [Unix nanosecond timestamp](/influxdb/version/reference/glossary/#unix-timestamp)
and returns the corresponding RFC3339 timestamp.
Converts an integer (Unix timestamp in seconds) to a timestamp value.
The underlying result is a timestamp (`Timestamp(TimeUnit::Second, None)`).
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).
When output to Parquet, the raw integer value (for example, `1641042000`) is preserved.
```sql
from_unixtime(expression)
@ -1454,7 +1455,7 @@ SELECT tz(time, 'Australia/Sydney') AS time_tz, time FROM home ORDER BY time LIM
differ when the input timestamp **does not** have a timezone.
- When using an input timestamp that does not have a timezone (the default behavior in InfluxDB) with the
`AT TIME ZONE` operator, the operator returns the the same timestamp, but with a timezone offset
`AT TIME ZONE` operator, the operator returns the same timestamp, but with a timezone offset
(also known as the "wall clock" time)--for example:
```sql