Skip to content

Commit aab32da

Browse files
committed
renamed local timezone method
1 parent 85a8809 commit aab32da

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/bundle/Resources/public/js/scripts/admin.picker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const SELECTOR_PICKER_INPUT = '.ibexa-date-time-picker__input';
44
const SELECTOR_FORM_INPUT = '.ibexa-picker__form-input';
55
const pickers = doc.querySelectorAll(SELECTOR_PICKER);
6-
const { formatShortDateTime, convertDateToTimezone, browserTimezone } = ibexa.helpers.timezone;
6+
const { formatShortDateTime, convertDateToTimezone, getBrowserTimezone } = ibexa.helpers.timezone;
77
const userTimezone = ibexa.adminUiConfig.timezone;
88
const pickerConfig = {
99
enableTime: true,
@@ -26,7 +26,7 @@
2626
if (formInput.value) {
2727
const date = new Date(formInput.value * 1000);
2828
const dateWithUserTimezone = convertDateToTimezone(date, userTimezone);
29-
const localTimezone = browserTimezone();
29+
const localTimezone = getBrowserTimezone();
3030
const convertedDate = convertDateToTimezone(dateWithUserTimezone, localTimezone, true).format();
3131

3232
defaultDate = convertedDate;

src/bundle/Resources/public/js/scripts/helpers/timezone.helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
const formatShortDateTime = (date, timezone = userPreferredTimezone, format = userPreferredShortDateTimeFormat) => {
2020
return formatDate(date, timezone, format);
2121
};
22-
const browserTimezone = () => {
22+
const getBrowserTimezone = () => {
2323
return Intl.DateTimeFormat().resolvedOptions().timeZone;
2424
};
2525

2626
ibexa.addConfig('helpers.timezone', {
2727
convertDateToTimezone,
2828
formatFullDateTime,
2929
formatShortDateTime,
30-
browserTimezone,
30+
getBrowserTimezone,
3131
});
3232
})(window, window.document, window.ibexa, window.moment);

0 commit comments

Comments
 (0)