vishwa306 / googlecl

Automatically exported from code.google.com/p/googlecl
0 stars 0 forks source link

Calendar Function Returns Events Outside of Specified Date Range as Specified in Local Time. #522

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Select a range of dates for testing. Example: 2012-08-06,2014-03-29

2. Create a test event on the calendar for 2012-08-05 beginning at 2100 and 
ending at 2130.

More generally, useful test events will have some portion of the event outside 
the range as interpreted in local time, but inside the range as interpreted in 
UTC.  In the U.S. local times lag UTC by several hours, so an ideal test event 
is on the evening (local time) prior to the first date in the range, after 2400 
UTC and before 2400 local time.  For locations in the continental U.S., test 
events after 8 PM and before midnight on the day prior to the test range should 
be suitable.

3.  Call the calendar function: 

google calendar --config=$config-file list --delim=^ 
--fields=when,title,where,who --date=2012-08-06,2014-03-29

What is the expected output? What do you see instead?

Expected results:  The calendar function should return only events matching the 
range specified in the --date option as interpreted in local time as defined by 
the TZ environment variable. 

Observed results:

The calender function returns events outside the date range specified in the 
--date option (as interpreted in local time) if the date of the event in UTC is 
within the date range.  In other words, calendar will display events from the 
day prior to the date range if any portion of the event is within the UTC day 
of the first date in the range.

The calendar function appears to treat dates specified in the --date option as 
though in the UTC time zone, despite the setting of the "Calendar Time Zone:" 
data element in the web interface and despite the setting of the TZ environment 
variable. As a result, if you specify a range of dates using the --date option, 
calendar will display an event that is outside that range, as interpreted in 
local time (as the user would expect), if any portion of such event is within 
the range when interpreted in UTC.

What version of the product are you using? On what operating system? What
version of gdata-python-client (aka python-gdata)?

   /usr/bin/google0.9.14
   Debian GNU/Linux 6.0.7 (squeeze)  2.6.32-5-amd64
   python-gdata 2.0.8-1.1

Please provide any additional information below.

I am unable to reproduce the problem with 

   google 0.9.13
   Ubuntu 10.10 (maverick) 2.6.35-32-generic
   python-gdata  2.0.8-1.1

so it may be new behavior in 0.9.14. The problem may be related to issues 427 
and 515.

Original issue reported on code.google.com by neilormos on 3 May 2013 at 5:35