jalaali / moment-jalaali

A Jalaali (Jalali, Persian, Khorshidi, Shamsi) calendar system plugin for moment.js.
MIT License
940 stars 162 forks source link

wrong time for next year #228

Closed mekramy closed 2 years ago

mekramy commented 2 years ago

i have a utc gregorian datetime . i'll create a moment object from my datetime but date format show wrong time! clock should be 7:00 but format function return 8:00!

const moment = require("moment-jalaali");
const t = moment("2022-03-23T03:30:00Z");
console.log(t.format("jYYYY-jMM-jDD HH:mm:ss")); // 1401-01-03 08:00:00 
console.log(t.format("YYYY-MM-DD HH:mm:ss")); // 2022-03-23 08:00:00
console.log(t.utc().format("YYYY-MM-DD HH:mm:ss")); // 2022-03-23 03:30:00