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

How to set time zones? #9

Open
BradtheOldGit opened this issue Nov 10, 2022 · 1 comment
Open

How to set time zones? #9

BradtheOldGit opened this issue Nov 10, 2022 · 1 comment

Comments

@BradtheOldGit
Copy link

How to setup time zones? I want dates from the 24/October so I have to select the 23/October. Then the table is subset correctly. Guessing the calendar is running on UTC? Thanks.

                ```

daterangepicker(
inputId = "Dates",
label = "Date Range",
start = as_datetime(format(Sys.time(), '%Y-%m-%d'), tz = "Australia/Sydney") - hours(24),
end = as_datetime(format(Sys.time(), '%Y-%m-%d'), tz = "Australia/Sydney") + hours(24) - seconds(1),
max = as_datetime(format(Sys.time(), '%Y-%m-%d'), tz = "Australia/Sydney") + hours(24) - seconds(1),
options = daterangepickerOptions(maxSpan = list("days" = 2),
timePicker = TRUE,
timePicker24Hour = TRUE,
timePickerIncrement = 1,
cancelIsClear = TRUE,
locale = list(format = "LL",
separator = ' —— ',
cancelLabel = 'Clear',
daysOfWeek = format(seq.Date(as.Date("2000-01-03"),
as.Date("2000-01-09"),
by = "days"), "%a"),
monthNames = format(seq.Date(as.Date("2000-01-01"),
as.Date("2000-12-31"),
by = "months"), "%b"))))

@trafficonese
Copy link
Owner

Hey,
Yes, apparently it only works for UTC times. There have been several attempts to include the timezone argument, but apparently this just resulted in more errors. See this comment: dangrossman/daterangepicker#1620

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

2 participants