fingerpich / jalali-moment

Display, parse, manipulate, validate and convert jalali (Persian, Khorshidi, Shamsi) or Gregorian (Miladi) dates and times.
https://fingerpich.github.io/jalali-moment/
MIT License
436 stars 68 forks source link

27/1/1400 can be interpereted different in different time zones #123

Open yasin459 opened 2 years ago

yasin459 commented 2 years ago

consider two different time zones and bellow code: moment.from("1401/01/27", "fa", "YYYY-MM-DD") based on the time we are in the day and time zone, this code can provide different answers (different epoch because of different time zone) how can I get the result JUST in "+04:30"? it seems that there is no timezone conversion provided for "moment.from" function. for example I can use moment(x).utcOffset("+04:30") and it will show time in my preferred time zone but this can't be done before converting times using moment.from

fingerpich commented 2 years ago

I don't know there is a work around for this or not, but I know from function doesn't do what you expect and it would be great if you create a PR and add this parameter to the from function