JDate
JDate copied to clipboard
Convert Jalali to Gregorian
My system info
- nodejs: 14.15.0
- jalali-date: 1.1.2
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?
hmm... Not sure what's wrong. It seems like it has something to do with timezone. What's your timezone?
OS config:
- timezone: Iran, Tehran.
- OS: kali Linux, version 2020.3
I have faced the same problem too. It is one day behind