Replies: 4 comments
|
Use .valueOf() to get the unix timestamp and use your date lib with your locale or timezone. |
|
I have spent hours trying to get it to work using a different timezone other than my local browser timezone and I just can't find a way. Neither can AI. Is there an example of how this can work. In my app I allow user's to set their timezone and that gets stored in the DB. It works fine as long as they set their timezone to match the actual timezone they are in, but if I set it to anything other than that it just won't work for me. I live in CST but if I set my timezone in my app EST the timeline headers for hours shows that the day starts at 1AM. And if I set the timezone to anything west of CST it shows the previous day as the current day. I love this component but I really need this to work somehow. Here's the utility file I created for formatting the timezones: ` dayjs.extend(utc) /**
/**
/**
/**
/**
|
Triage Review (0.30.0-beta.9)Status: Valid feature request — still relevant ✅ The library internally uses
The workaround of passing UTC timestamps and using To properly support timezones, the library would need:
This is a legitimate feature gap for the stable release, especially for applications serving users across timezones. It's a feature request rather than a bug, but an important one. |
|
I saw that there was a branch with a fix for this, but not yet a PR. Any idea of when it will be merged? It would be amazing for our use case when going into past schedules that are not in the same timezone due to DST. |
Uh oh!
There was an error while loading. Please reload this page.
Description: In the react-calendar-timeline package, versions 0.30.0-beta.1 and 0.30.0-beta.2, there is no available method to change the timezone. Most of the time, the package works with timestamps, and even using dayjs, it is impossible to change the timezone.
Steps to Reproduce:
Install version 0.30.0-beta.1 or 0.30.0-beta.2 of react-calendar-timeline.
Attempt to change the timezone using dayjs or other methods.
Notice that the timezone cannot be modified, even though it’s working with timestamps.
Expected Behavior: There should be a way to adjust or set the timezone for the calendar to handle time properly based on the user's local timezone or a different specific timezone.
Actual Behavior: There is no available option to change the timezone, making it difficult to work with time-sensitive data across different time zones.
Screenshots: (If applicable, add screenshots here to help explain the issue.)
Library Version: react-calendar-timeline version 0.30.0-beta.1 and 0.30.0-beta.2.
React Version: 18.2
All reactions