moment-timezone Questions

3

Solved

I can get the Timezone offset with the following command as: new Date().getTimezoneOffset() -> -330 and using moment moment().utcOffset() as 330. However, how do I get the format as ±hh:mm?
Feeder asked 19/9, 2022 at 17:50

9

Solved

What is the best way to get client's timezone and convert it to some other timezone when using moment.js and moment-timezone.js I want to find out what is clients timezone and later convert his da...

5

Solved

I have a date/time with a timezone and want to convert it into UTC const date = '2019-04-10T20:30:00Z'; const zone = 'Asia/Kuala_Lumpur'; const utcDate = moment(date).tz(zone).utc().format(); cons...
Cispadane asked 10/4, 2019 at 12:1

3

With webpack 3, I was using moment-timezone-data-webpack-plugin to reduce my bundle size and it worked well. Tests showed it reduced the bundle size dramatically. I've now upgraded to webpack 4 and...
Familiarity asked 31/7, 2021 at 16:34

1

My app needs material-ui date and time pickers to operate on a remote time zone specified by the server. I'd like the today circle on the date picker to actually indicate today in the remote time z...
Ingenue asked 18/3, 2021 at 19:7

0

How is it possible to simulate the system clock being set to another timezone in an Angular Unit Test with Karma/Jasmine. I am working an a custom datetime picker component. It has a bug that can o...
Cheerly asked 21/10, 2020 at 7:30

1

Solved

I am using moment timezone library to show the zone abbreviation after the timestamp. I am using the following snippet to show the zone abbreviation of New York, USA var timeZone = moment.tz.guess...
Hyperostosis asked 8/7, 2020 at 15:58

1

Solved

I am using rSchedule to produce working hour intervals.But timezone is ignored. How can I achieve it? The input is working hour intervals in a day, with timezone as below. const input = { worki...
Largish asked 8/11, 2019 at 20:36

2

I am converting Miliseconds to date and time using moment It gives me correct output as expected but while converting same date+time it gives me wrong output. I have used unix,valueOf moment metho...
Mesmerism asked 29/8, 2019 at 10:59

1

Solved

I'm using the webpack template from vue-cli for my Vue project and I have both moment and moment-timezone installed in npm. In my single file components, I've been able to get moment to work with ...
Whitsunday asked 11/7, 2018 at 2:33
1

© 2022 - 2024 — McMap. All rights reserved.