Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Jalali to Gregorian #28

Open
kasir-barati opened this issue Feb 10, 2021 · 3 comments
Open

Convert Jalali to Gregorian #28

kasir-barati opened this issue Feb 10, 2021 · 3 comments

Comments

@kasir-barati
Copy link

kasir-barati commented Feb 10, 2021

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?

@arashm
Copy link
Owner

arashm commented Mar 6, 2021

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

@kasir-barati
Copy link
Author

OS config:

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

@shaheenzahedi
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants