[Pkg-owncloud-commits] [php-sabre-vobject] 239/341: Fix date and time format for xCard.
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 13:35:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabre-vobject.
commit 1b6caca2662105dec53c2754ac8e7817ab5ce757
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date: Tue Jan 27 15:49:25 2015 +0100
Fix date and time format for xCard.
xCard is the only XML and JSON format that has the same date and time
format than vCard.
---
lib/Property/VCard/TimeStamp.php | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/lib/Property/VCard/TimeStamp.php b/lib/Property/VCard/TimeStamp.php
index 9939dcb..498788a 100644
--- a/lib/Property/VCard/TimeStamp.php
+++ b/lib/Property/VCard/TimeStamp.php
@@ -4,7 +4,8 @@ namespace Sabre\VObject\Property\VCard;
use
Sabre\VObject\DateTimeParser,
- Sabre\VObject\Property\Text;
+ Sabre\VObject\Property\Text,
+ Sabre\Xml;
/**
* TimeStamp property
@@ -66,4 +67,20 @@ class TimeStamp extends Text {
return [$dateStr];
}
+
+ /**
+ * This method serializes only the value of a property. This is used to
+ * create xCard or xCal documents.
+ *
+ * @param Xml\Writer $writer XML writer.
+ * @return void
+ */
+ protected function xmlSerializeValue(Xml\Writer $writer) {
+
+ // xCard is the only XML and JSON format that has the same date and time
+ // format than vCard.
+ $valueType = strtolower($this->getValueType());
+ $writer->writeElement($valueType, $this->getValue());
+
+ }
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git
More information about the Pkg-owncloud-commits
mailing list