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

[VUE 3] viewPreset changing timezone #6080

Closed
marciogurka opened this issue Jan 30, 2023 · 2 comments
Closed

[VUE 3] viewPreset changing timezone #6080

marciogurka opened this issue Jan 30, 2023 · 2 comments
Labels
bug Something isn't working example forum Issues from forum invalid This doesn't seem right large-account Reported by large customer OEM OEM customer vue3 Vue 3 framework integration

Comments

@marciogurka
Copy link

Forum post

"I've noticed what looks like strange behaviour with the Scheduler Pro when we use the double click event to add a new event.

scheduleDblClick({ date }) {
  console.log(date);
  // Hide Bryntum built-in contextmenu (schedule double click)
  return false;
},

The date parameter that is returned will usually be in GMT at various viewPreset modes e.g. dayAndWeek but when we change the viewPreset mode to monthAndYear the date is returning the date offset by 1 hour (GMT + 1 , BST).

e.g.
dayAndWeek
date = "2023-01-27T00:00:00.000Z"
Wed Jan 25 2023 00:00:00 GMT+0000 (Greenwich Mean Time)
25/01/2023, 00:00:00 with toLocaleString()

monthAndYear
date = "2023-01-27T23:00:00.000Z"
Wed Oct 12 2022 00:00:00 GMT+0100 (British Summer Time)
25/01/2023, 00:00:00 with toLocaleString()

Note: I'm in the UK so the local time is GMT at the moment, so I don't know where it's getting the BST value from

I have tried to reproduce this with a standalone app but it doesn't seem to do this in that app, it always returns the date correctly in GMT.

Is there a setting I can use to ensure that dates are always set to the correct timezone for each view preset?
"
zoomissue.zip

Zoom.Issue.mp4
@marciogurka marciogurka added bug Something isn't working example forum Issues from forum vue3 Vue 3 framework integration large-account Reported by large customer OEM OEM customer labels Jan 30, 2023
@jsakalos
Copy link

Marcio, I think that BST comes from browser javascript and has nothing to do with our code (not 100% certain though). The event he is creating is August when the Summer Time was active. The first event is in January so GMT is OK.

I'd give it some investigation toward this idea.

@JockeLindberg JockeLindberg added the invalid This doesn't seem right label Jan 31, 2023
@JockeLindberg
Copy link

Closing this as this is, as @jsakalos writes, just how time zones work in JS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working example forum Issues from forum invalid This doesn't seem right large-account Reported by large customer OEM OEM customer vue3 Vue 3 framework integration
Projects
None yet
Development

No branches or pull requests

3 participants