Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /openpsa/addons/funambol/src/java/org/openpsa/sync4j/CalendarSyncSource.java

openpsa
Discussion topic

Back to topic list

CVS update: /openpsa/addons/funambol/src/java/org/openpsa/sync4j/CalendarSyncSource.java

Author juhana
Full name Juhana Hirvilahti
Date 2007-02-23 07:17:30 PST
Message User: juhana
Date: 2007-02-23 07:17:30-0800
Log:
 Date/time fixes

File Changes:

Directory: /openpsa/addons/funa​mbol/src/java/org/op​enpsa/sync4j/
====================​====================​====================​====

File [changed]: CalendarSyncSource.java
Url: http://openpsa.tigri​s.org/source/browse/​openpsa/addons/funam​bol/src/java/org/ope​npsa/sync4j/Calendar​SyncSource.java?r1=1​.138&r2=1.139
Delta lines: +7 -1
-------------------
--- CalendarSyncSource.java 2007-02-23 07:03:04-0800 1.138
+++ CalendarSyncSource.java 2007-02-23 07:17:27-0800 1.139
@@ -96,7 +96,7 @@
         // This is for the timezone fix
         java.util.Calendar utilCal = new GregorianCalendar();
         
- return new Timestamp(date.getTime() + (utilCal.get(java.ut​il.Calendar.ZONE_OFF​SET) + utilCal.get(java.uti​l.Calendar.DST_OFFSE​T)));
+ return new Timestamp(date.getTime() - (utilCal.get(java.ut​il.Calendar.ZONE_OFF​SET) - utilCal.get(java.uti​l.Calendar.DST_OFFSE​T)));
         /*
         TimeZone zone = TimeZone.getDefault();
         return new Timestamp(date.getTime() - zone.getRawOffset() - zone.getDSTSavings());
@@ -107,8 +107,14 @@
         if (timestamp == null) {
             timestamp = new Date();
         }
+ // This is for the timezone fix
+ java.util.Calendar utilCal = new GregorianCalendar();
+
+ return new Date(timestamp.getTime() + (utilCal.get(java.ut​il.Calendar.ZONE_OFF​SET) + utilCal.get(java.uti​l.Calendar.DST_OFFSE​T)));
+ /*
         TimeZone zone = TimeZone.getDefault();
         return new Date(timestamp.getTime() + zone.getRawOffset() + zone.getDSTSavings());
+ */
     }
 
     protected Set getNewGuids(MidgardUser user, Date since)

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /openpsa/addons/funambol/src/java/org/openpsa/sync4j/CalendarSyncSource.java juhana Juhana Hirvilahti 2007-02-23 07:17:30 PST
Messages per page: