I often need to display information based on or influenced by a user's actual local time which differs across time zones. Is there a reliable way of getting a user's current time and/or timezone? Key Issues: Server-side code is based on...
I use the Moment.js and Moment-Timezone frameworks, and have a Moment.js date object which is explicitly in UTC timezone. How can I convert that to the current timezone of the browser? var testDateUtc = moment.tz("2015-01-30 10:00:00", "...
The format of my date string looks like this: yyyy-MM-ddTHH:mm:ss-0Z00 Example 1: 2010-03-05T07:03:51-0800 Example 2: 2010-07-01T20:23:00-0700 I need to create a date object using these date strings. new Date() does not work on this string. Please...
I have a scenario where I have a timezone offset (in minutes) and need to determine the timezone for it. I know that all the data is not available (for example, there may be several timezones with an offset of -240 minutes) but a "best guess"...
For example, using a date and time control, the user selects a date and time, such that the string representation is the following: "6-25-2012 12:00:00 PM" It so happens that this user is in the EST time zone. The string is passed to the s...
I have this backend that sends me a pre formatted time in a set time zone, but without any information for the said time zone. The strings are like: "2013-08-26 16:55:00". I can create a new moment.js instance with this string: var time = m...
I have a line that sets the current date and time in a cell: sheet.getRange(1,1).setValue(new Date()); Then I have a line that creates a formatted date based on that cell's value: var addedDate = sheet.getRange(1,1).getValue(); var addedTime...
I have an application displaying a week of bookable time slots (of a resource). A time slot is always 30 min long and can either start :00 or :30. The availabilites are internally represented by the week's minutes (in an array), 0 meaning the w...
I need a way to convert times in the future to different timezones without relying on the user's computer time. At registration time, the user supplies his timezone. When he logs in, I calculate the offset in minutes between the UTC time and his...
In using webpack to build my project, I typically require modules in CommonJS from npm modules. I need moment-timezone in my project, however in building the package you must also build all the data from moment-timezone, which can be quite a lot. A...
©2020 All rights reserved.