<name>note_create_date</name>
<type>text</type>
<notnull>true</notnull>
- <length>32</length>
+ <length>33</length>
</field>
<field>
<name>note_last_change_date</name>
<type>text</type>
<notnull>true</notnull>
- <length>32</length>
+ <length>33</length>
</field>
<field>
<name>note_last_metadata_change_date</name>
<type>text</type>
<notnull>true</notnull>
- <length>32</length>
+ <length>33</length>
</field>
<field>
<id>grauphel</id>
<name>Grauphel: Tomboy note server</name>
<description>Tomboy REST API server to sync notes between devices</description>
- <version>0.1.1</version>
+ <version>0.2.0</version>
<licence>AGPL3 or later</licence>
<author>Christian Weiske</author>
<requiremin>7</requiremin>
return $notes;
}
+ protected function fixDate($date)
+ {
+ if (strlen($date) == 32) {
+ //Bug in grauphel 0.1.1; date fields in DB had only 32 instead of 33
+ // characters. The last digit of the time zone was missing
+ $date .= '0';
+ }
+ return $date;
+ }
+
protected function noteFromRow($row)
{
return (object) array(
'guid' => $row['note_guid'],
- 'create-date' => $row['note_create_date'],
- 'last-change-date' => $row['note_last_change_date'],
- 'last-metadata-change-date' => $row['note_last_metadata_change_date'],
+ 'create-date' => $this->fixDate($row['note_create_date']),
+ 'last-change-date' => $this->fixDate($row['note_last_change_date']),
+ 'last-metadata-change-date' => $this->fixDate($row['note_last_metadata_change_date']),
'title' => $row['note_title'],
'note-content' => $row['note_content'],