JDate icon indicating copy to clipboard operation
JDate copied to clipboard

Convert Jalali to Gregorian

Open kasir-barati opened this issue 5 years ago • 3 comments

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?

kasir-barati avatar Feb 10 '21 07:02 kasir-barati

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

arashm avatar Mar 06 '21 00:03 arashm

OS config:

  • timezone: Iran, Tehran.
  • OS: kali Linux, version 2020.3

kasir-barati avatar Mar 06 '21 07:03 kasir-barati

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

shaheenzahedi avatar Mar 16 '22 14:03 shaheenzahedi