Incorrect date behavior in Javascript

I'm having problems with dates and time zones, wondering why these two different queries give different results. It’s rare that this also changes timeshares depending on the year I’m trying to send. I am using Firefox 26.0 on top of Ubuntu

Query:

new Date("1990-04-12T00:00:00-03:00")

Result:

Date {Wed Apr 11 1990 23:00:00 GMT-0400 (WART)}

Query:

new Date("1983-04-12T00:00:00-03:00")

Result:

Date {Tue Apr 12 1983 00:00:00 GMT-0300 (ART)}

Any clue?

+3
source share
1 answer

JavaScript, ECMAScript 5.1 ( ), . , , , , JavaScript . , 1983, 1990 , , .

, .

ECMAScript 6, , . , , .

Edit

, , , , America/Argentina/San_Luis . 1990 , UTC-2, UTC-4, UTC-3. , . .

, , , , UTC-3 2009 . , , , .

, FireFox Ubuntu ES6. . ( , .)

.

+1

All Articles