arashm / JDate

A Jalali to Gregorian converter in Javascript with support of formatting output
MIT License
90 stars 27 forks source link

Convert Jalali to Gregorian #28

Open kasir-barati opened 3 years ago

kasir-barati commented 3 years ago

My system info

what i expect:

Conver the Jalali to Gregorian when i write this code:

let JDate = require('jalali-date');
let temp = new JDate(1399, 11, 22);

what happened:

It is behind, One day!

let JDate = require('jalali-date');
let temp = new JDate(1399, 11, 22);
console.log(temp._d); // 2021-02-09T20:30:00.000Z
console.log(new Date); //2021-02-10T07:46:28.132Z

why is this happening?

arashm commented 3 years ago

hmm... Not sure what's wrong. It seems like it has something to do with timezone. What's your timezone?

kasir-barati commented 3 years ago

OS config:

shaheenzahedi commented 2 years ago

I have faced the same problem too. It is one day behind