calendar-assistant
calendar-assistant copied to clipboard
Showing business hours for own time zone
Hi, I'm currently sharing my calendar from exchange onto google calendar. I'd love to see the availabilities of multiple personal different calendars together. By default, google calendar uses Coordinated Universal Time which can't be changed. As a result, when I run avail, I only see times which are available for business hours during Coordinated Universal Time and my local time zone.
How can I change avail so it shows availabilities with consideration to business hours of my current time zone only?
Thanks!
Hi, thanks for asking this question. I'm not sure what you're seeing (some sample output might help) but the timezone used for avail
is the google calendar's time zone.
Can you please check what time zone your calendar(s) are using by going to the settings page? For example, here's what I see for my personal calendar:
and the output from avail
:
$ calendar-assistant avail -p personal
[email protected]
- looking for blocks at least 30 mins long
- between 9am and 6pm in America/New_York
Availability on Sunday, September 26:
• 9:00am - 6:00pm EDT (9h)
If I switch it to:
then it outputs:
- between 9am and 6pm in America/Los_Angeles
Availability on Sunday, September 26:
• 9:00am - 6:00pm PDT (9h)
I hope this helps? If you have any suggestions on how to improve the documentation, please let me know or submit a pull request!
Thanks for following up! Yes the trouble is when using shared calendar outputs from outlook, google calendar forces the time zone to be in Coordinated Universal Time to avoid problems. There's no option to change it as you can see.
Overall time zone setting in for calendar (can change):
Personal calendar timezone (can change):
Outlook shared calendar (can not change):
As a result, when setting work hours in the availability command, the program tries to find times that are within working hours of two different time zones.
For example, when I run the command calendar-assistant availability today..wednesday -a [email protected],[email protected]
, I get the below output. There are no available blocks because it tries to find intersection of 11am to 6pm in UTC and 11am and 6pm in PST.
[email protected], [email protected]
- looking for blocks at least 30 mins long
- between 11am and 6pm in UTC
- between 11am and 6pm in America/Los_Angeles
Availability on Monday, September 27:
(No available blocks in this time range.)
Availability on Tuesday, September 28:
(No available blocks in this time range.)
Availability on Wednesday, September 29:
(No available blocks in this time range.)
Ideally, it'd be great if I could specify to only consider the working times of one calendar (ie in PST). I'm not as familiar with Ruby, but if you could point me toward the relevant file or lines of code that affects the working times and its respective timezone, I could probably change it in a local build. Thanks!
Hmm, that's interesting. Thanks for the deeper explanation.
Calendar Assistant doesn't currently provide any means for configuring individual calendars, because it assumes what it gets from the API is correct and appropriate.
One solution might be to add calendar-specific configuration, but given this feels like a bit of an edge case, that would be more work than I'm willing to take on right now.
Another solution might be to allow a commandline argument (or a config file setting) to override all the calendar settings and show a single time zone (or set of time zones).
WDYT of something like this:
$ calendar assistant --avail today -a [email protected],[email protected] -z America/New_York,Europe/London
- looking for blocks at least 30 mins long
- between 11am and 6pm in America/New_York
- between 11am and 6pm in Europe/London
?
Yeah! Your solution makes sense. Having something that could show a single time zone or set of time zones would be quite helpful. It would be useful for other use cases as well when trying to coordinate with different time zones.
Hi, just following up on this. Is there an easy way to implement what you are suggesting? Not as familiar with Ruby but if you point to some sections of code maybe I can poke around with it on a local copy?
@su-stephen Sorry for not responding earlier. I have pushed a branch at https://github.com/flavorjones/calendar-assistant/pull/192 that I think basically does what we've discussed. It supports this UX:
calendar-assistant avail today \
--tz=Europe/London,America/Los_Angeles \
-a [email protected],[email protected]
outputs:
- looking for blocks at least 30 mins long
- between 9am and 6pm in Europe/London
- between 9am and 6pm in America/Los_Angeles
Availability on Monday, November 29:
• 3:30pm - 4:00pm GMT / 7:30am - 8:00am PST (30m)
regardless of the calendars' time zone settings. Would love your feedback either here or in that PR.
This is perfect! Thanks for the help. My only minor feedback is that it may be a bit confusing at first with the phrasing below because it is confusing whether the 9am to 6pm is in American/Chicago time or if it is in local time and only the output is in American/Chicago time .
- looking for blocks at least 30 mins long
- between 9am and 6pm in America/Chicago