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

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

Open
yasin459 opened this issue Apr 9, 2022 · 1 comment
Open

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

yasin459 opened this issue Apr 9, 2022 · 1 comment

Comments

@yasin459
Copy link

yasin459 commented Apr 9, 2022

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

@yasin459 yasin459 changed the title 2/1/1400 can be interpereted different in different time zones 27/1/1400 can be interpereted different in different time zones Apr 9, 2022
@fingerpich
Copy link
Owner

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

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

2 participants