java – . Time format used in ICs file?
•
Java
I'm creating one in Java ICs file, I need to know the date and time format to use
This is the current format of my ICs file:
BEGIN:VCALENDAR VERSION:2.0 BEGIN:VEVENT DTSTART:20120901T180000 DTEND:20120901T183000 SUMMARY:my birthday LOCATION:Bangalore DESCRIPTION:Every one is welcome..!! time to party PRIORITY:3 END:VEVENT END:VCALENDAR
I use ISO_ DATETIME_ TIME_ ZONE_ Format converts my date to the desired format, but it returns 2012-09-01t18:00:00:00
What is the date format used in the dtstart and dtend values? Specifically, how do I format it correctly in Java?
Solution
With Java, you can use
DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd'T'HHmmss");
See iCalendar RFC 5545 for more information
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码