Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent timezone handling #3785

Open
megatrond opened this issue Aug 14, 2023 · 3 comments · May be fixed by #5931
Open

Inconsistent timezone handling #3785

megatrond opened this issue Aug 14, 2023 · 3 comments · May be fixed by #5931
Assignees
Labels
bug Something isn't working

Comments

@megatrond
Copy link

Describe the bug
Just to preface - I'm not sure if this is a bug or a feature, it just left me a little confused and after talking with darrell.neo on Discord we agreed it could be filed to serve as documentation.

Our schema has a DateTime field and when we pass iso8601 strings with no timezone offset (zulu times) in, we get zulu times back from the graphql api. But - the field is stored in neo4j with an offset, and this offset seems to be dependent on which timezone nodejs is configured with.

On my local machine, running node without any timezone configuration stores the fields in neo4j with a +2 offset. Adding the following line to our graphql api code: process.env.TZ = 'Zulu'; will cause the times to be stored without an offset when querying with cypher.

This behaviour is completely hidden when looking at this from the graphql side, as we both pass zulu times in and reliably get zulu times back when doing graphql queries.

I think one of two things should happen:

  1. Either, what gets passed in is also what is stored - so if we pass offsets over graphql, the offset information is also stored in neo4j
  2. Or, what gets stored is also returned - so if neo4j has stored a time with a timezone offset, that offset is also returned over graphql

I'm happy to provide more information if needed!

@megatrond megatrond added the bug Something isn't working label Aug 14, 2023
@neo4j-team-graphql
Copy link
Collaborator

Many thanks for raising this bug report @megatrond. 🐛 We will now attempt to reproduce the bug based on the steps you have provided.

Please ensure that you've provided the necessary information for a minimal reproduction, including but not limited to:

  • Type definitions
  • Resolvers
  • Query and/or Mutation (or multiple) needed to reproduce

If you have a support agreement with Neo4j, please link this GitHub issue to a new or existing Zendesk ticket.

Thanks again! 🙏

@neo4j-team-graphql
Copy link
Collaborator

Many thanks for raising this bug report @megatrond. 🐛 We will now attempt to reproduce the bug based on the steps you have provided.

Please ensure that you've provided the necessary information for a minimal reproduction, including but not limited to:

  • Type definitions
  • Resolvers
  • Query and/or Mutation (or multiple) needed to reproduce

If you have a support agreement with Neo4j, please link this GitHub issue to a new or existing Zendesk ticket.

Thanks again! 🙏

@btroop
Copy link

btroop commented Apr 13, 2024

i was runnig into some weird timezone stuff as well and hacked my way around it by using the supported LocalDateTime type. But agreed that there are some weird ways that dates are generated on a client, sent through graphql, stored in neo4j, then read through graphql that transform the data away from the original generated date w/ timezone.

@github-project-automation github-project-automation bot moved this to Low priority in Bug Triage Aug 26, 2024
@darrellwarde darrellwarde linked a pull request Jan 6, 2025 that will close this issue
@darrellwarde darrellwarde linked a pull request Jan 6, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Low priority
Development

Successfully merging a pull request may close this issue.

4 participants