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

Programmatically set timezone #70

Open
jariesdev opened this issue Sep 11, 2020 · 1 comment
Open

Programmatically set timezone #70

jariesdev opened this issue Sep 11, 2020 · 1 comment

Comments

@jariesdev
Copy link

Hi I would like to know to properly set the timezone programmatically, like in middleware.

Copy link
Member

farnabaz commented Feb 3, 2021

Hey,
Sorry for the late response.
You can change timezone of a moment instance by calling tz function

const date = this.$moment()
date.tz("America/Los_Angeles")

OR change default timezone using $moment.tz.setDefault

$moment.tz.setDefault("America/Los_Angeles")

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