After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 238346 - Copy&paste of events in week view removes timezone info
Copy&paste of events in week view removes timezone info
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Calendar
2.8.x (obsolete)
Other All
: Normal major
: ---
Assigned To: Milan Crha
Evolution QA team
: 268420 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-02-19 18:38 UTC by Federico Mena Quintero
Modified: 2013-09-10 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed evo patch (5.29 KB, patch)
2008-09-26 08:50 UTC, Milan Crha
reviewed Details | Review
proposed evo patch ][ (7.62 KB, patch)
2009-02-02 18:27 UTC, Milan Crha
committed Details | Review

Description Federico Mena Quintero 2003-02-19 18:38:52 UTC
Description of Problem:
In the week/month view, I copied an event that has a timezone different
than my native one.  Then I pasted it on another day and the time of the
new event was correct but it was offset to the local timezone.  It should
keep the original timezone, I think.

Steps to reproduce the problem:
1. Set your timezone to Mexico City.
2. Create an event with a New York timezone.
3. Go to the week view.
4. Right-click on the event and Copy it.
5. Right-click on another day and Paste.

Actual Results:
The event gets pasted in the new day correctly and at what would be the
correct local time (e.g. 11:00 in Mexico City while the original event was
at 12:00 in New York).  However, it uses the local timezone (Mexico City)
rather than the original one (New York).

Expected Results:
The event would get the original timezone.

How often does this happen? 
Every time.  It doesn't happen on the day view, however, which does keep
the original timezone.

Additional Information:
I'm using Evo 1.2.1.99.
Comment 1 Gerardo Marin 2004-09-07 18:20:08 UTC
Still an issue in 1.5.94
Comment 2 Gerardo Marin 2004-10-18 19:14:55 UTC
*** bug 268420 has been marked as a duplicate of this bug. ***
Comment 3 André Klapper 2004-12-28 13:27:14 UTC
very related to bug 245156, if this gets solved please copy the code to 
also solve bug 245156... ;-)
Comment 4 JP Rosevear 2005-02-23 17:24:01 UTC
Hmm, this does happen on the day view as well and is intentional. 
Referring to product design as part of a calendar view refresh in 2.3
Comment 5 André Klapper 2006-06-17 18:50:55 UTC
uhm... even worse in 2.7.3 - the time zone info gets removed, but the time itself does not get converted, so the appointment will be displayed at the original timezone time, but not my timezone time.
i can miss appointments because of that.
Comment 6 Matthew Barnes 2008-03-11 00:26:51 UTC
Bumping version to a stable release.
Comment 7 Milan Crha 2008-09-26 08:50:25 UTC
Created attachment 119402 [details] [review]
proposed evo patch

for evolution;

Keep old timezones if possible.
Comment 8 Chenthill P 2009-01-20 17:25:44 UTC
The patch looks fine if the oldtimezone is one of the libical timezones. In case if the timezone is not in libical (such as exchange timezones), old_dtstart.zone might be NULL. We might have to use the tzid parameter to get the timezone from the backend. Have you tested moving appointments which has a exchange timezone in it ?
Comment 9 Milan Crha 2009-02-02 18:27:39 UTC
Created attachment 127774 [details] [review]
proposed evo patch ][

for evolution;

Right, it didn't work there. Mainly because the timezone from the source calendar wasn't known for the destination calendar. This fixes it.

As you asked in the other bug, those two cycles could be done in one, but I intentionally do this in two, as my comment above the timezone cycle says:
/* add timezones first, to have them ready */
Comment 10 Chenthill P 2009-02-25 10:49:13 UTC
The parts in if (!e_cal_get_timezone (client, tzid, &zone, &error)) {
 inside add_related_timezones can be swapped for clarity. say if (e_cal_get_timezone) { } else {print error}. Please make these changes and commit the patch.

Comment 11 Milan Crha 2009-02-25 12:01:43 UTC
I do not agree with that change, really, it would be with your request:
   if (e_cal_get_timezone ()) {
      if (zone && ...) {
         ...
      }
   } else {
      print err
   }

The actual code seems to me much clearer. But as you mentioned on IRC, DTSTAMP is supposed to be in UTC, thus I'm going to remove this one from list of items to check.
Comment 12 Milan Crha 2009-02-25 12:04:47 UTC
Slightly modified committed to trunk. Committed revision 37337.
Comment 13 Chenthill P 2009-02-26 05:26:52 UTC
Once e_cal_get_timezone succeeds, you need to check if (zone) at all.