Moment-timezone: Brazilian daylight time

Created on 12 Jun 2019  ·  19Comments  ·  Source: moment/moment-timezone

Hi, in 2019-04-29 the President of Brazil decreated the end of daylight time for 2019/2020. Yours have a prevision of publish a correction of the problem?

Most helpful comment

Updated. Please install [email protected]

All 19 comments

Hey guys! Do you have any news? We are face problems with our aplication with brazilian customers! Thank you!

Iana releases a new version: 2019b

Are there any plans at updating the lib data folder with the latest 2019 file? 🤔 😬

I'll update soon

Updated. Please install [email protected]

Hi, @ellenaua.

I've just tested the [email protected] on npm runkit and the problem wasn't solved.

Code

const moment = require("moment-timezone")

moment('2019-11-03').tz('America/Sao_Paulo').toDate()

Result
Sun Nov 03 2019 01:00:00 GMT-0200 (Brasilia Summer Time)

Expected
Sun Nov 03 2019 00:00:00 GMT-0300 (Brasilia Standard Time)

Hi, @ellenaua.

I've just tested the [email protected] on npm runkit and the problem wasn't solved.

Code

const moment = require("moment-timezone")

moment('2019-11-03').tz('America/Sao_Paulo').toDate()

Result
Sun Nov 03 2019 01:00:00 GMT-0200 (Brasilia Summer Time)

Expected
Sun Nov 03 2019 00:00:00 GMT-0300 (Brasilia Standard Time)

Same problem here when updating to [email protected]

Yes, IANA hasn't released an updated new version of the timezones yet. :man_facepalming: :cry:

@lucianopf by any chance, do you have a patch to solve this issue?

Not actually mate, I'm still waiting for the new release =(

@ellenaua for some reason... and I can't tell why... the moment-timezone version 0.5.26 is holding my browser down... it gets stuck in some kind of looping and then my page crashes ... I tried to debug but couldn't.... do you think anything related to this version might be the issue?

I did some investigation and it seems to happen when I call this method: Moment.tz(date, timezone).format()

:scream: :heart:

Thaaanks!!!

Hi, I've seen that the pull request for the fix was approved. Any prevision for when it will be released? @lucianopf

I'm not a contributor of the lib neither the author of the PR, sorry mate =/

Either ways, I've been checking the 2019c version of IANA but it doesn't seem to remove the daylight saving time from Brazilian time zones yet, I don't know how to proceed since it's already October and nothing has been released 🤦‍♂

Guys, actually I've been testing the 0.5.26 version, using the 2019b IANA version and it seems to be working as expected for "America/Sao_Paulo", it's quite complex to read the zones data but it has been changes (removed) from the 2019b version and I'd say it's just a matter of updating to the newest moment-timezone version! 🎉

Try it out here: https://codesandbox.io/embed/focused-panini-8p8m0?fontsize=14

Update ref: https://github.com/moment/moment-timezone/commit/896b301f129044f589955d87fea567059c102dd7#diff-5578e5b008e0d899c7dc1543b6caf5ccR668

Reading the data files: https://momentjs.com/timezone/docs/#/data-formats/packed-format/

My solution for is simple, at least in my use case it works fine. Just
change the region to "America/Recife" if you are not able to update it or
if it doesn't work properly.

On Tue, Oct 1, 2019 at 11:20 PM Luciano Pellacani Franca <
[email protected]> wrote:

Guys, actually I've been testing the 0.5.26 version, using the 2019b IANA
version and it seems to be working as expected for "America/Sao_Paulo",
it's quite complex to read the zones data but it has been changes (removed)
from the 2019b version and I'd say it's just a matter of updating to the
newest moment-timezone version! 🎉

Try it out here:
https://codesandbox.io/embed/focused-panini-8p8m0?fontsize=14

Update ref: 896b301#diff-5578e5b008e0d899c7dc1543b6caf5ccR668
https://github.com/moment/moment-timezone/commit/896b301f129044f589955d87fea567059c102dd7#diff-5578e5b008e0d899c7dc1543b6caf5ccR668

Reading the data files:
https://momentjs.com/timezone/docs/#/data-formats/packed-format/


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/moment/moment-timezone/issues/757?email_source=notifications&email_token=AAWX2WYYF4QXIU7AYMZ5H5LQMQAPHA5CNFSM4HXIGV6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEADKQYA#issuecomment-537307232,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWX2W3CTAJRBAL3VKVS263QMQAPHANCNFSM4HXIGV6A
.

--
Atenciosamente:
Matheus Rosendo Pedreira

The problem to 'America/Sao_Paulo' already solved in the 0.5.26 version.
when use the command moment('2019-11-03').tz('America/Sao_Paulo') show the correct timeZone, but when use moment('2019-11-03').tz('America/Sao_Paulo').toDate(), the result is changed by javascript from browser. It is the problem, the chrome has a problem, it not was updated to new configuration to Brazil.
You can execute the same test in IE, FireFox e Chrome. IE and Firefox is correctly.

I have one bug opened to Chrome in https://bugs.chromium.org/p/chromium/issues/detail?id=1009000&q=brazil&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified.

It seems to be fixed in Chromium 78.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rama41222 picture rama41222  ·  3Comments

mj1856 picture mj1856  ·  5Comments

casper5822 picture casper5822  ·  5Comments

palindrom615 picture palindrom615  ·  4Comments

SathyaChenniappan picture SathyaChenniappan  ·  4Comments