You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/advanced-algorithms/available-algorithms/date.mdx
+29-5Lines changed: 29 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
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.
4
4
---
5
5
6
6
import { Steps } from'nextra/components'
@@ -60,6 +60,18 @@ The `timezone` parameter can be specified with the database TZ identifier (text)
@@ -481,25 +481,25 @@ MATCH (s:School) RETURN s.Calculus.hour;
481
481
482
482
### LocalDateTime
483
483
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()`.
485
485
LocalDateTime uses the defined [timezone](#database-timezone) to convert between local and UTC time.
486
486
487
487
<Callouttype="info">
488
488
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.
491
491
All LocalDateTime is converted to UTC, so comparing time points between different timezones gives the correct result.
492
492
493
493
</Callout>
494
494
495
495
<Callouttype="warning">
496
496
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.
498
498
499
499
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.
501
501
502
-
Pre 2.19 executing `LocalDateTime()` would return the current UTC time.
502
+
Pre 2.19 executing `LocalDateTime()` would return the current UTC time.
503
503
Any such saved data is still "correct" post 2.19; timezone will correctly be applied and local time will be displayed.
504
504
505
505
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;
569
569
`LocalDateTime` uses the set database timezone to properly convert between system time (UTC) and local (user) time.
570
570
571
571
The timezone can be defined via:
572
-
1.`--timezone` command-line argument
572
+
1.`--timezone` command-line argument
573
573
1.`SET DATABASE SETTING "timezone" TO "Europe/Rome"` query
574
574
575
575
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).
576
576
577
+
<Callouttype="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
+
577
585
### ZonedDateTime
578
586
579
587
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.
581
589
582
590
**Strings**
583
591
@@ -799,7 +807,7 @@ Memgraph supports four Coordinate Reference Systems (CRS) for spatial data, divi
799
807
800
808
A WGS-84 point consists of longitude, latitude, and height if the point is 3D.
801
809
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.
0 commit comments