[Synckolab] Date problem
niko.berger at corinis.com
Mon Jun 13 03:40:51 EDT 2005
Sauro Saltini wrote:
> Mathy Vanvoorden wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> I'm having a problem with 0.4.17 (and .16 too, just upgraded). I
>> searched the archives and couldn't find anything so here it goes:
>> When I sync my contacts, the plugin writes them to the IMAP folder ok,
>> but it puts them in the wrong timezone. The result is that any changes I
>> make don't always get saved on a next sync. At least, I think that's the
>> reason ;-)
>> The date on one of the messages:
>> Date: Thu, 26 May 2005 20:47:07 -0-120
>> I don't even know if that is a valid timezone :) Both me and my IMAP
>> server are in CEST (GMT+2).
> I've already posted sometimes ago about the same problem but haven't
> had any response yet.
> An excerpt from my previous post follows, this quick solution has
> worked for me on 0.4.10.
> On my Win2k client Date.getTimezoneOffset returns "-120" (that is 2
> hours), all my standard TB messages (for example in my sent folder)
> have "GMT +0200".
> PS: I'm Italian so my Timezone is GMT +0100 plus "Daylight Saving Time"
> I can't figure out how the piece of code at contactTools.js (line 508)
> can write the correct date (in fact it writes out GMT "-0-120" which
> is surely wrong.
> I've modified that line with the following:
> var sdate = "Date: " + getDayString(cdate.getDay()) + ", " +
> cdate.getDate() + " " +
> getMonthString (cdate.getMonth()) + " " +
> cdate.getFullYear() + " " + sTime
> + " " + ((cdate.getTimezoneOffset() < 0)?"+":"-") +
> (Math.abs(cdate.getTimezoneOffset()/60)<10?"0":"") +
> Math.abs(cdate.getTimezoneOffset()/60) +"00\n";
> and the date issue seems solved (at least on my system).
> I've looked into the code of 0.4.17 and found that this statement has
> been moved in tools.js as a part of genMailHeader function.
> Also I think that the same stuff can be safely removed from
> contactTools.js (at the beginning of card2message function) as the
> sdate variable isn't used in any other part of the function.
>> Also, if I delete the contacts in the IMAP folder, I have to sync twice
>> before they get re-added.
> I'm experiencing this new problem too, also (even after modifying the
> code as said) when I change some fields in a contact the vcard isn't
> modified at the first sync and the contact is overwritten from vcard
> at the second sync !
>> - --
>> Best regards,
>> Mathy Vanvoorden
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.1 (GNU/Linux)
>> -----END PGP SIGNATURE-----
>> Synckolab mailing list
>> Synckolab at mozdev.org
> Hope this helps.
> Synckolab mailing list
> Synckolab at mozdev.org
I included the patch now...
thanks and sorry i didnt see that until now :)
Ps.: maybe add "Patch" to the subject if the mail includes a patch :)
that helps a lot
More information about the Synckolab