Skip to content

Commit 3836bca

Browse files
tzdata version incompatibility warning (#1185)
* added warnings * update warning on procedure page * added warnings * update warning --------- Co-authored-by: katarinasupe <[email protected]>
1 parent 0411e0e commit 3836bca

File tree

2 files changed

+56
-24
lines changed

2 files changed

+56
-24
lines changed

pages/advanced-algorithms/available-algorithms/date.mdx

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: date
3-
description: Discover how to effectively perform date-based operations in your graph data with Memgraph's Date class. Also, check out our documentation to learn how to manipulate and better contextualize dates in your data.
3+
description: Discover how to effectively perform date-based operations in your graph data with Memgraph's Date class. Also, check out our documentation to learn how to manipulate and better contextualize dates in your data.
44
---
55

66
import { Steps } from 'nextra/components'
@@ -60,6 +60,18 @@ The `timezone` parameter can be specified with the database TZ identifier (text)
6060
name, as listed for
6161
[timezones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
6262

63+
<Callout type="warning">
64+
65+
Starting with `tzdata` version `2024b`, its format has changed and an
66+
incompatibility with the current libstdc++ has been introduced. As a result,
67+
using `tzdata` version `2024b` or later will break the timezone feature in
68+
Memgraph. This could lead to incorrect handling of timezones and unexpected
69+
behavior in your application. To avoid compatibility issues, please ensure that
70+
you are using `tzdata` `v2024a` or earlier with Memgraph until libstdc++ has
71+
been updated to support the new format in tzdata.
72+
73+
</Callout>
74+
6375
{<h4 className="custom-header"> Output: </h4>}
6476

6577
- `formatted: string` ➡ The received time in the specified format.
@@ -69,7 +81,7 @@ name, as listed for
6981
Use the following query to get a string representation from a time value:
7082

7183
```cypher
72-
CALL date.format(74976, "h", "%Y/%m/%d %H:%M:%S %Z", "Mexico/BajaNorte")
84+
CALL date.format(74976, "h", "%Y/%m/%d %H:%M:%S %Z", "Mexico/BajaNorte")
7385
YIELD formatted RETURN formatted;
7486
```
7587

@@ -107,6 +119,18 @@ The `timezone` parameter can be specified with the database TZ identifier (text)
107119
name, as listed for
108120
[timezones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
109121

122+
<Callout type="warning">
123+
124+
Starting with `tzdata` version `2024b`, its format has changed and an
125+
incompatibility with the current libstdc++ has been introduced. As a result,
126+
using `tzdata` version `2024b` or later will break the timezone feature in
127+
Memgraph. This could lead to incorrect handling of timezones and unexpected
128+
behavior in your application. To avoid compatibility issues, please ensure that
129+
you are using `tzdata` `v2024a` or earlier with Memgraph until libstdc++ has
130+
been updated to support the new format in tzdata.
131+
132+
</Callout>
133+
110134
{<h4 className="custom-header"> Output: </h4>}
111135

112136
- `parsed: int` ➡ The number of time units that have elapsed since the Unix epoch.
@@ -116,7 +140,7 @@ name, as listed for
116140
Use the following query to parse the date string:
117141

118142
```cypher
119-
CALL date.parse("2023/08/03 14:30:00", "h", "%Y/%m/%d %H:%M:%S", "Europe/Zagreb")
143+
CALL date.parse("2023/08/03 14:30:00", "h", "%Y/%m/%d %H:%M:%S", "Europe/Zagreb")
120144
YIELD parsed RETURN parsed;
121145
```
122146

@@ -134,9 +158,9 @@ Adds two numeric values representing quantities of time in specific units.
134158

135159
{<h4 className="custom-header"> Input: </h4>}
136160

137-
- `time: int` ➡ The first term in the addition operation.
161+
- `time: int` ➡ The first term in the addition operation.
138162
- `unit: string` ➡ The time unit of the above value.
139-
- `add_value: int` ➡ The second term in the addition operation.
163+
- `add_value: int` ➡ The second term in the addition operation.
140164
- `add_unit: string` ➡ The time unit of the above value.
141165

142166
The `unit` parameter supports the following values:

pages/fundamentals/data-types.mdx

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ calling the function `duration()`.
287287
For strings, the duration format is: `P[nD]T[nH][nM][nS]`.
288288

289289
The `n` stands for a number, and the capital letters are used as a separator
290-
with each field in `[]` marked optional.
290+
with each field in `[]` marked optional.
291291

292292
| name | description |
293293
| :--: | :---------: |
@@ -296,9 +296,9 @@ with each field in `[]` marked optional.
296296
| M | Minutes |
297297
| S | Seconds |
298298

299-
When using strings, only the last filed can be a double, e.g., `P2DT2.5H`.
299+
When using strings, only the last filed can be a double, e.g., `P2DT2.5H`.
300300

301-
Example:
301+
Example:
302302

303303
```cypher
304304
CREATE (:F1Laps {lap: duration("PT2M2.33S")});
@@ -310,7 +310,7 @@ Maps can contain the following six fields: `day`, `hour`, `minute`, `second`,
310310
`millisecond` and `microsecond`. Every field can be a double, an int or a
311311
mixture of both. Memgraph also supports negative durations.
312312

313-
Example:
313+
Example:
314314

315315
```cypher
316316
CREATE (:F1Laps {lap: duration({minute:2, second:2, microsecond:33})});
@@ -373,7 +373,7 @@ MATCH (f:F1Laps) RETURN f.lap.second;
373373
### Date
374374

375375
You can create a property of temporal type `Date` from a string or map by
376-
calling the function `Date()`.
376+
calling the function `Date()`.
377377

378378

379379
**String**
@@ -389,7 +389,7 @@ For strings, the date format is specified by the ISO 8601: `YYYY-MM-DD` or
389389

390390
The lowest year is `0` and the highest is `9999`.
391391

392-
Example:
392+
Example:
393393

394394
```cypher
395395
CREATE (:Person {birthday: date("1947-07-30")});
@@ -402,7 +402,7 @@ to the current date of the calendar (UTC clock).
402402

403403
For maps, three fields are available: `year`, `month`, `day`.
404404

405-
Example:
405+
Example:
406406

407407
```cypher
408408
CREATE (:Person {birthday: date({year:1947, month:7, day:30})});
@@ -416,7 +416,7 @@ You can access the individual fields of a date through its properties:
416416
| month | Returns the month field |
417417
| day | Returns the day field |
418418

419-
Example:
419+
Example:
420420

421421
```cypher
422422
MATCH (b:Person) RETURN b.birthday.year;
@@ -425,7 +425,7 @@ MATCH (b:Person) RETURN b.birthday.year;
425425
### LocalTime
426426

427427
You can create a property of temporal type `LocalTime` from a string or map by
428-
calling the function `localTime()`.
428+
calling the function `localTime()`.
429429

430430
**Strings**
431431

@@ -438,7 +438,7 @@ or `[T]hh:mm` or `[T]hhmmss` or `[T]hhmm` or `[T]hh`.
438438
| m | Minutes |
439439
| s | Seconds |
440440

441-
Example:
441+
Example:
442442

443443
```cypher
444444
CREATE (:School {Calculus: localTime("09:15:00")});
@@ -481,25 +481,25 @@ MATCH (s:School) RETURN s.Calculus.hour;
481481

482482
### LocalDateTime
483483

484-
You can create a property of temporal type `LocalDateTime` from a string or map by calling the function `localDateTime()`.
484+
You can create a property of temporal type `LocalDateTime` from a string or map by calling the function `localDateTime()`.
485485
LocalDateTime uses the defined [timezone](#database-timezone) to convert between local and UTC time.
486486

487487
<Callout type="info">
488488

489-
At a lower level, LocalDateTime will use system time (UTC), changing the instance timezone will
490-
change the displayed time point, but will not change the underlying data.
489+
At a lower level, LocalDateTime will use system time (UTC), changing the instance timezone will
490+
change the displayed time point, but will not change the underlying data.
491491
All LocalDateTime is converted to UTC, so comparing time points between different timezones gives the correct result.
492492

493493
</Callout>
494494

495495
<Callout type="warning">
496496

497-
When recovering from pre-2.19 snapshots and WALs, the observed LocalDateTime might change due to the introduction of the timezone.
497+
When recovering from pre-2.19 snapshots and WALs, the observed LocalDateTime might change due to the introduction of the timezone.
498498

499499
Previously LocalDateTime was interpreted and saved as UTC time.
500-
Post 2.19, the displayed LocalDateTime is in the local timezone and gets converted to UTC time.
500+
Post 2.19, the displayed LocalDateTime is in the local timezone and gets converted to UTC time.
501501

502-
Pre 2.19 executing `LocalDateTime()` would return the current UTC time.
502+
Pre 2.19 executing `LocalDateTime()` would return the current UTC time.
503503
Any such saved data is still "correct" post 2.19; timezone will correctly be applied and local time will be displayed.
504504

505505
Executing `LocalDateTime("2024-07-24T13:30:00")` will give different result pre and post 2.19.
@@ -569,15 +569,23 @@ MATCH (f:Flights) RETURN f.AIR123.year;
569569
`LocalDateTime` uses the set database timezone to properly convert between system time (UTC) and local (user) time.
570570

571571
The timezone can be defined via:
572-
1. `--timezone` command-line argument
572+
1. `--timezone` command-line argument
573573
1. `SET DATABASE SETTING "timezone" TO "Europe/Rome"` query
574574

575575
Both methods use IANA timezone descriptors to specify the timezone. See [list of time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List).
576576

577+
<Callout type="warning">
578+
579+
Starting with `tzdata` version `2024b`, its format has changed and an incompatibility with the current libstdc++ has been introduced.
580+
As a result, using `tzdata` version `2024b` or later will break the timezone feature in Memgraph. This could lead to incorrect handling of timezones and unexpected behavior in your application.
581+
To avoid compatibility issues, please ensure that you are using `tzdata` `v2024a` or earlier with Memgraph until libstdc++ has been updated to support the new format in tzdata.
582+
583+
</Callout>
584+
577585
### ZonedDateTime
578586

579587
You can create a value of the `ZonedDateTime` type from a string or a map by
580-
calling the `datetime()` function.
588+
calling the `datetime()` function.
581589

582590
**Strings**
583591

@@ -799,7 +807,7 @@ Memgraph supports four Coordinate Reference Systems (CRS) for spatial data, divi
799807

800808
A WGS-84 point consists of longitude, latitude, and height if the point is 3D.
801809
Longitude and latitude are specified in degrees while height is specified in meters.
802-
Longitude has to be in the [-180, 180] range, latitude in the [-90, 90] range and height can be any `Float` value.
810+
Longitude has to be in the [-180, 180] range, latitude in the [-90, 90] range and height can be any `Float` value.
803811

804812
| Point type | SRID | CRS |
805813
| :---------------: | :----------: | :--------: |

0 commit comments

Comments
 (0)