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
Issue with converting to Europe/London timezone #1219
Comments
Looks ok. |
Indeed it does @iamkun. Weird that the exact same code in my app does not work the same and that it is specific for "Europe/London" only. I am most probably missing something on my side. |
Ok managed to get a better view on why this is happening. If i put .locale() call after .timezone() call i get the issue. |
@AlexGrafe it is already reopened. |
Thanks @anzap. Everything works with enough duct tape I guess. Thanks for the workaround 👍 |
You just saved my night, thanks @anzap |
@iamkun Any update on this one? |
This is still an issue with the latest update. This is a significant bug with the locale() function right? Basically what its doing is its marking any date that's in timezone +0 as UTC when locale() is called. At least that's what it seems to be doing... Can someone look into this? |
Timezone seems broken for London in general. It keeps adding my timezone locale. Very frustating.
|
Anyone find any fix to this? |
Is there anyone looking into this? Need locale and timezone to work before publishing my app, and I imagine it's not an uncommon scenario. |
@iamkun I think this reproduces the issue as I've seen it: https://runkit.com/bingnz/dayjs-london-bug |
I have same problem too. |
I have same problem. I recommended this in my company and moved here because of small size. but facing issue here also |
This problem exists for the following time zones with UTC +00:00. |
@iamkun this issue still persists in the latest release. I've created a codesandbox reproducing the issue, it occurs when calling startOf/endOf/add/subtract with a dayjs date using a tz in GMT-0. |
Describe the bug
I have dates formatted in ISO-8601 format and use dayjs to convert them to different timezones. Conversion works file for all cases except for "Europe/London". It seems the issue might apply to all timezones that match UTC one.
What i do is i use dayjs in an angular app where i have a custom pipe doing the following in the function:
where value is
2020-11-06T19:27:08Z
and tzEurope/London
and patternDD MMM, HH:mm a
In this case i would expect
06 Nov, 19:27 pm
but i get06 Nov, 17:27 pm
.If i change timezone to something that does not match UTC like
Europe/Athens
orEurope/Paris
the conversion works fine.Information
The text was updated successfully, but these errors were encountered: