flagsmith icon indicating copy to clipboard operation
flagsmith copied to clipboard

Timezone improvements for Scheduled Flags

Open dabeeeenster opened this issue 1 year ago • 6 comments

Currently the frontend shows the following for scheduled flags

image

We want to give more certainty around times than is currently being done. We should

  • Instead of Europe / London we should show the timezone e.g. UTC +1
  • We should show a note if the scheduled timezone is different to the current timezone (If possible) e.g. Note, your local timezone will be different to now on the above date), it will be scheduled for x date and time UTC

dabeeeenster avatar Apr 06 '23 07:04 dabeeeenster

Can I work on this ?@dabeeeenster

alceil avatar Apr 08 '23 04:04 alceil

Can I work on this ?@dabeeeenster

Sure!

dabeeeenster avatar Apr 08 '23 07:04 dabeeeenster

Thanks @dabeeeenster

alceil avatar Apr 08 '23 08:04 alceil

image New change is something like this is this okay? @dabeeeenster

alceil avatar Apr 13 '23 08:04 alceil

That looks good @alceil. One thing that would be good to clarify here is what happens in the case that you're scheduling a change for the future that spans a change in timezone. For example, if I schedule a change now in the UK, it will show UTC+1 because we're in BST. BUT, if I schedule the change for November, let's say, the timezone in the UK will actually be GMT (which is the same as UTC).

Let's take an example to try and think this through:

I'm in the UK, my current timezone is BST (UTC+1). I schedule a change for November 22nd at 11am. The logic here (I think) will send the API a value of something like "2023-11-22T10:00:00.000000+00:00" as it sends the UTC value (again, I think). This will mean that the change will actually happen at 10am in the UK on the 22nd November, because the timezone in the UK is, at that point, the same as UTC.

Am I correct in my assumptions here? Is there a solution to this?

matthewelwell avatar Apr 13 '23 11:04 matthewelwell

That looks good @alceil. One thing that would be good to clarify here is what happens in the case that you're scheduling a change for the future that spans a change in timezone. For example, if I schedule a change now in the UK, it will show UTC+1 because we're in BST. BUT, if I schedule the change for November, let's say, the timezone in the UK will actually be GMT (which is the same as UTC).

Let's take an example to try and think this through:

I'm in the UK, my current timezone is BST (UTC+1). I schedule a change for November 22nd at 11am. The logic here (I think) will send the API a value of something like "2023-11-22T10:00:00.000000+00:00" as it sends the UTC value (again, I think). This will mean that the change will actually happen at 10am in the UK on the 22nd November, because the timezone in the UK is, at that point, the same as UTC.

Am I correct in my assumptions here? Is there a solution to this?

Hi @matthewelwell I think this can be handled via a Day Light Saving check. There will be a small fix. Can you please assign this to me?

jainpawan21 avatar Aug 01 '23 18:08 jainpawan21

@kyle-ssg I think this PR included sufficient work to close this issue, do you agree?

matthewelwell avatar Apr 02 '24 10:04 matthewelwell