You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by fo...@apache.org on 2024/02/13 10:48:25 UTC
(avro) 01/01: Update `local-timestamp` example
This is an automated email from the ASF dual-hosted git repository.
fokko pushed a commit to branch fd-fix-local-timestamp-example
in repository https://gitbox.apache.org/repos/asf/avro.git
commit 497885e3dc909d443cd3e8a51e0f616f9b5acf47
Author: Fokko Driesprong <fo...@tabular.io>
AuthorDate: Tue Feb 13 11:48:19 2024 +0100
Update `local-timestamp` example
The concept of the local-timestamp is each value is a recording of what can be seen on a calendar and a clock hanging on the wall, for example, "1969-07-20 16:17:39". It can be decomposed into year, month, day, hour, minute, and seconds fields, but with no time zone information available, it does not correspond to any specific point in time. It is often used in legacy systems.
The example was 12 hours off.
---
doc/content/en/docs/++version++/Specification/_index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/content/en/docs/++version++/Specification/_index.md b/doc/content/en/docs/++version++/Specification/_index.md
index c63086941..1c16d8783 100755
--- a/doc/content/en/docs/++version++/Specification/_index.md
+++ b/doc/content/en/docs/++version++/Specification/_index.md
@@ -888,7 +888,7 @@ The `local-timestamp-{millis,micros,nanos}` logical type represents a timestamp
- `local-timestamp-micros`: logical type annotates an Avro `long`, where the long stores the number of microseconds, from 1 January 1970 00:00:00.000000.
- `local-timestamp-nanos`: logical type annotates an Avro `long`, where the long stores the number of nanoseconds, from 1 January 1970 00:00:00.000000000.
-Example: Given an event at noon local time (12:00) on January 1, 2000, in Helsinki where the local time was two hours east of UTC (UTC+2). The timestamp is converted to Avro long 946684800000 (milliseconds) and then written.
+Example: Given an event at noon local time (12:00) on January 1, 2000, in Helsinki where the local time was two hours east of UTC (UTC+2). The timestamp is converted to Avro long 946728000000 (milliseconds) and then written.
### Duration
The `duration` logical type represents an amount of time defined by a number of months, days and milliseconds. This is not equivalent to a number of milliseconds, because, depending on the moment in time from which the duration is measured, the number of days in the month and number of milliseconds in a day may differ. Other standard periods such as years, quarters, hours and minutes can be expressed through these basic periods.