Highcharts set global timezone for all charts - highcharts

I'm trying to set my timezone for all charts on my webpage to America/New_York.
I tried many things, using timezoneoffset, timezone with moment.js.
Seems like impossible for me for some reason.
Can someone please help me to set the timezone to the timezone I want, instead of using the client's timezone.
Thank you.

Related

Force TMonthCalendar to display user defined date format

By default TMonthCalendar shows date in the format that is set in Windows control panel (Short Date). I want to override this setting and force TMonthCalendar to always display my format regardless of Windows setting. Is it possible ?
As far as I know, you can not change the date format settings of TMonthCalendar.
The reason for this is the fact that TMonthCalendar is actually just a wrapper around a calendar API from the OS. That is why not only is the date format in the form that is set in OS regional settings, but the whole look of the calendar matches the look of the OS on which you are running your application on.
So, I'm afraid you will have to look at some third party components for this. For instance, TMS Software has several calendar and date-time picking components as part of TPlannerCalendar.
No, this control is a wrapper for the native Month Calendar Control. As the documentation states:
The month-calendar control gets its format and all strings from
LOCALE_USER_DEFAULT.

I want to change the datepicker for my mobile website on iOS

Currently the datepickers trigger the default iOS datepicker with dd-mm-yyyy format. I would like it to trigger the dddd-dd-mm-yyyy format so users are better at picking the correct date because they can see the actual day of the week.
Is this possible for a mobile website?
I'm not sure about doing it for mobile website. But we can change format of default iOS date picker if you want. It's directly not possible through date picker. There is another component called UIPickerView in iOS, through which we can achieve this. Check how to create UIPickerView for mobile website and place the values you want in pickerView.
So after doing more research on the subject I have found that it is possible to use datetime-local. This triggers the native datepicker with ddd-dd-mm format but also accounts for the year (so scrolling over december 31 will make the date object move to the next year). This workaround has issues with IE though, so is not a universal solution.

Check if date is correct in IOS

Currently, I am grabbing the current date by NSDate().timeIntervalSince1970. However, I am concerned that the user will change the date on the phone to mess with my app. So I was wondering which of the two options below is a more suitable fix
Is there some sort of Apple way to grab the current date from an apple server.
Is there a good and reliable API where I can grab current date?
Use the TIMEAPI available at www.timeapi.org
You can retrieve the current time in UTC here.

How do I get a list of timezone names of a browser

I want to get the browser specific timezone names (different browsers displays different text for each system setting) for system available time zones. I need the exact string of the timezone that are in the "()" when writing console.error(new Date()) but not just for my current settings, without changing my OS settings and restarting the browser each time.
AFAIK js libraries uses their own name lists to solve this but the resulting names are different from the browser timezone name. I need the name as the browser will write it.
Thanks.
It was not possible when the question was asked, but with the Intl.supportedValuesOf it is possible in modern engines:
console.log(Intl.supportedValuesOf('timeZone'));
At the time of this writing, you can ask for "calendar", "collation", "currency","numberingSystem", "timeZone" and "unit".
Intl.supportedValuesOf('timeZone') now provides the list of all available timezones on some browsers, including Safari and Chrome for iOS caniuse.com.

grails datePicker submit date with timeZone

I am sending date through g:datePicker as Eastern time by default.
How do I have an option where i pass date based on the timeZone selected?
Please help.
Grails datepicker tag does not and should not deal with your timezone. Its just a presentation of date and accepts Date object. Meaning that whatever timezone the date object has it will be that.
There are number of libraries to handle timezone on client side such as ECMAScript Internationalization API, moment.js and many others. On the server side you have libraries such as Joda-time and so on. I am sure if you search on Google you can find plenty more options.
Just handle your timezone conversion, then the presentation layer could be Grails datepicker or bootstrap-datepicker or jquery and etc.

Resources