Closed adrianmarinSH closed 4 months ago
您的邮件已收到,我会尽快给您回复。
I found out the issue, the problem was that I had a local file of timezones from old version of the moment-timezone
package, looks like because of the way Meteor reads the files, this file located in client/lib
was being reading before the file of the last version of the package.
After deleting this file the issue was fixed. Leaving the solution here if someone has the same problem
Hello, I have found a weird issue happening in my project with moment-timezone, for some reason when I change the timezone or I want to get the current date formatted in another timezone the date is being returned with 1 hour subtracted.
It seems like if the library or something got stuck in day-light change or something like that and is returning weird dates.
I would like to see if someone could help me and tell me if they have had the same problem or know how to fix it.
I have tried to update the
moment
andmoment-timezone
libraries to the last versions but the problem keeps happening.In the example I'm using the method
moment(date).tz(timezone).format()
I have also tried usingmoment.tz(date, timezone).format()
but the issue is the same.Thanks!!!