vx8700/vx9400 bug fix

Nathan Hjelm <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <[email protected]>
I am seeing an exception while writing calendar events to the  
VX-8700. It seems that, contrary to what I thought, GPSDATE field is  
not automatically set.

I see no any way around modifying com_lgvx8100.py to get this to  
work. Am I wrong? Any idea of the correct way?

Anyway, here is a patch to com_lgvx8100.py that check for the  
existence of mdate and cdate fields and sets them to the current time.


-Nathan Hjelm

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
BitPim-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
scheduleevent.patch (application/octet-stream, 806 B)
Index: src/phones/com_lgvx8100.py
===================================================================
--- phones/com_lgvx8100.py	(revision 4235)
+++ phones/com_lgvx8100.py	(working copy)
@@ -427,6 +427,11 @@
                                        # defined packet.
             if data.alarmindex_vibrate!=1: # if alarm set
                 contains_alarms=True
+            t=time.gmtime()
+            if 'cdate' in data.getfields():
+                data.cdate = (t.tm_year, t.tm_mon, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec)
+            if 'mdate' in data.getfields():
+                data.mdate = (t.tm_year, t.tm_mon, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec)
             # put entry in nice shiny new dict we are building
             entry=copy.copy(entry)
             newcal[data.pos]=entry
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.