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

Configure datetime-picker to use a specific timezone, example Europe/London #203

Open
sumit13587 opened this issue Jul 12, 2017 · 2 comments

Comments

@sumit13587
Copy link

How can we configure datetime-picker to follow timezone of Europe/London (UTC+001)?

We tried the following, which did not work:

<input ng-model="ordersModel.order.orderStartDate" type="text" id="orderStartDate" datetime-picker="MM/dd/yyyy HH:mm" class="form-control" ng-model-options="{timezone: 'Europe/London'}" datepicker-append-to-body="true" is-open="startDateCalendar.isOpen">

@vikey913
Copy link

Guys,

Any update on this ?

@jsantos
Copy link

jsantos commented Nov 10, 2017

I believe (but I might be wrong) it only supports time zone offsets.

E.g.: ng-model-options="{timezone: 'UTC+02:00'}

I'm having some trouble with this as it's not super accurate for things like Daylight Savings Time (the offset changes twice a year). Moment.js addresses this well (and understands something like 'Europe/London'), which I'm currently trying to integrate with the datetime picker.

Update (from https://docs.angularjs.org/api/ng/filter/date):

Timezone to be used for formatting. It understands UTC/GMT and the continental US time zone abbreviations, but for general use, use a time zone offset, for example, '+0430' (4 hours, 30 minutes east of the Greenwich meridian) If not specified, the timezone of the browser will be used.

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

3 participants