iso8601

Jersey Joda Time ISO 8601 parameter in urlencoded form

限于喜欢 提交于 2019-12-10 14:56:34
问题 I am using Jersey: 1.17.1 and defined a REST service accepting "application/x-www-form-urlencoded". I would like to accept a parameter "b" in ISO-8601 format and let Jersey map this to a Joda DateTime. @PUT @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public Response createTask(@FormParam("a") String a, @FormParam("b") DateTime b) { ... but I am getting this exception SEVERE: The following errors and warnings have been detected with resource and/or

Get ISO-8601(SCORM 2004) Duration Format in Seconds using MySQL

时光毁灭记忆、已成空白 提交于 2019-12-10 14:03:21
问题 I have a sql column with values like PT2M52.37S PT21.79S PT53M29.68S P PT9S Is it possible with some MySQL Functions to convert the above format to seconds? I have searched everything but didn't find something in exactly the same format as above. Any date mysql function I tried isn't working. More information regarding this format: http://www.ostyn.com/standards/scorm/samples/ISOTimeForSCORM.htm PHP Function (it always will be P, the first char) function scorm_format_duration($duration) { //

Writing a weekly recurring time interval (ISO 8601)

最后都变了- 提交于 2019-12-10 10:29:13
问题 i need a correct weekly ISO 8601 recurring time interval. For example, repeat: Each Monday, 19:00. I already tried a lot of examples, but nothing worked correctly :-( Thx for any help! 回答1: R/2014-W01-1T19:00:00/P1W Represents a unbounded recurrence with a start date and a duration of one week. The recurrence starts at the first day (Monday) of the week number 01 in the week year 2014. I have used a week date, but you can substitute it with a calendar date or ordinal date, just make sure the

How to do formally correct parsing of ISO8601 date times in .Net?

独自空忆成欢 提交于 2019-12-09 17:51:56
问题 There are many SO questions and answers regarding parsing of ISO8601 date/times in .NET and C#. However, there doesn't seem to be a 'definitive' answer anywhere, i.e. an answer that presents a formally correct ISO8601 parser that would correctly parse all of the possible format variants within ISO8601 and that would disallow non-ISO8601 variants. This SO answer is the closest match so far... How to create a .NET DateTime from ISO 8601 format 回答1: Okay. Let's start with the limitations you are

ISO 8601 Define repeating interval on Thanksgiving?

霸气de小男生 提交于 2019-12-08 02:55:52
问题 I'm trying to define an interval that repeats every year, starting on the 4th Thursday of November at 13:30z and ending on the same day at 15:00z. Can this be done using ISO 8601? 回答1: This kind of recurrence can't be expressed with current ISO 8601. Next version of ISO 8601 will most likely include a recurring time interval format based on iCalendar (RFC 5545:2009). 来源: https://stackoverflow.com/questions/46229717/iso-8601-define-repeating-interval-on-thanksgiving

VBScript ISO8601

痞子三分冷 提交于 2019-12-07 04:58:46
问题 In VBScript, does FormatDateTime have ISO 8601 support? If not, how would I write such function with it? For example: Response.Write FormatAsISO8601(#05/04/2011#) Function FormatAsISO8601(datetime) ... End Function 回答1: Here is the specific code I needed from Chris' class, a bit more optimized: Public Function ToIsoDateTime(datetime) ToIsoDateTime = ToIsoDate(datetime) & "T" & ToIsoTime(datetime) & CurrentTimezone End Function Public Function ToIsoDate(datetime) ToIsoDate = CStr(Year(datetime

Getting missmatch in datetime format using jms serializer and ISO8601

↘锁芯ラ 提交于 2019-12-07 03:41:40
问题 I am getting this message: Invalid datetime "2017-11-07T19:46:57.118Z", expected format Y-m-d\\TH:i:sP. When using JMS Serializer and the config: jms_serializer: handlers: datetime: default_format: 'Y-m-d\\TH:i:sP' I think that my supplied date is in the correct format, but apparently not. Is it something that is wrong with the date? 回答1: This is a tough one, I've run into it before. I was using annotations so my fix looked like: @Serializer\Type("DateTime<'Y-m-d\TH:i:s.uT'>") So I'm guessing

Android time in iso 8601

被刻印的时光 ゝ 提交于 2019-12-06 20:00:08
问题 using android and joda time lib - the I am trying to convert the user's timezone in order to format it later to : 2012-11-12T21:45:00+02:00 for example. DateTimeZone zone = DateTimeZone.forID( TimeZone.getDefault().getID()); the above code fails - anyone know how can I take "Europe/London" (Timezone.getID) and convert it to an offset so I can put it in ISO 8601 format? 回答1: If I have correctly understood your objective you can use directly the SimpleDateFormat class. Example code:

Angular2 DatePipe processing ISO 8601 Date (Invalid argument '*' for pipe 'DatePipe')?

杀马特。学长 韩版系。学妹 提交于 2019-12-06 16:33:58
I've just tried to use a simple date pipe in my angular2 app: Registered: {{user.registered | date:'shortDate'}} The error I get is: Invalid argument '2016-03-28T07:25:40.824Z' for pipe 'DatePipe' in [{{user && user.registered | date:'shortDate' }} in UserDialog@16:57] I do have a User model (minimal here) shared between this component and some others: export class User { public registered: Date; } I get the user data as JSON from backend, and it's a ISO 8601: 2016-03-28T07:26:01.202Z . When I use my own custom pipe, it works (example bellow). import {Pipe, PipeTransform} from 'angular2/core';

Parsing ISO8601 date/time with DateTime struct

痴心易碎 提交于 2019-12-06 12:07:29
问题 I am trying to parse an ISO8601 formatted date/time string with .NET's DateTime structure. In order for me to give a full underdstanding of the problem, I am going to perform tests using both .NET and JavaScript. I am currently in Britain (British Summer Time, which is UTC+01:00). My understanding of ISO8601 is that: When the string is suffixed with "Z", the time is expressed in UTC. When the string is suffixed with "+/-hh:mm", the time is expressed in Local time, where the "+/-hh:mm"