File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,14 +111,28 @@ public static DateTime ParseXsdDateTime(string dateTimeStr)
111111 return XmlConvert . ToDateTime ( dateTimeStr , XmlDateTimeSerializationMode . Utc ) ;
112112 }
113113
114+ public static TimeSpan ParseTimeSpan ( string dateTimeStr )
115+ {
116+ return dateTimeStr . StartsWith ( "P" ) || dateTimeStr . StartsWith ( "-P" )
117+ ? ParseXsdTimeSpan ( dateTimeStr )
118+ : TimeSpan . Parse ( dateTimeStr ) ;
119+ }
120+
114121 public static TimeSpan ParseXsdTimeSpan ( string dateTimeStr )
115122 {
116123 return XmlConvert . ToTimeSpan ( dateTimeStr ) ;
117124 }
118125
126+ public static TimeSpan ? ParseNullableTimeSpan ( string dateTimeStr )
127+ {
128+ return string . IsNullOrEmpty ( dateTimeStr )
129+ ? ( TimeSpan ? ) null
130+ : ParseTimeSpan ( dateTimeStr ) ;
131+ }
132+
119133 public static TimeSpan ? ParseXsdNullableTimeSpan ( string dateTimeStr )
120134 {
121- return String . IsNullOrEmpty ( dateTimeStr ) ?
135+ return String . IsNullOrEmpty ( dateTimeStr ) ?
122136 null :
123137 new TimeSpan ? ( XmlConvert . ToTimeSpan ( dateTimeStr ) ) ;
124138 }
Original file line number Diff line number Diff line change @@ -59,9 +59,9 @@ private static ParseStringDelegate GetParseFn()
5959 if ( typeof ( T ) == typeof ( DateTimeOffset ) || typeof ( T ) == typeof ( DateTimeOffset ? ) )
6060 return value => DateTimeSerializer . ParseDateTimeOffset ( value ) ;
6161 if ( typeof ( T ) == typeof ( TimeSpan ) )
62- return value => DateTimeSerializer . ParseXsdTimeSpan ( value ) ;
62+ return value => DateTimeSerializer . ParseTimeSpan ( value ) ;
6363 if ( typeof ( T ) == typeof ( TimeSpan ? ) )
64- return value => DateTimeSerializer . ParseXsdNullableTimeSpan ( value ) ;
64+ return value => DateTimeSerializer . ParseNullableTimeSpan ( value ) ;
6565#if ! MONOTOUCH && ! SILVERLIGHT && ! XBOX
6666 if ( typeof ( T ) == typeof ( System . Data . Linq . Binary ) )
6767 return value => new System . Data . Linq . Binary ( Convert . FromBase64String ( value ) ) ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ static Env()
2323 + ( IsMonoTouch ? " MonoTouch" : "" ) ;
2424 }
2525
26- public static decimal ServiceStackVersion = 3.78m ;
26+ public static decimal ServiceStackVersion = 3.79m ;
2727
2828 public static bool IsUnix { get ; set ; }
2929
Original file line number Diff line number Diff line change 3232// You can specify all the values or you can default the Build and Revision Numbers
3333// by using the '*' as shown below:
3434// [assembly: AssemblyVersion("1.0.*")]
35- [ assembly: AssemblyVersion ( "3.7.8 .0" ) ]
35+ [ assembly: AssemblyVersion ( "3.7.9 .0" ) ]
3636//[assembly: AssemblyFileVersion("1.0.0.0")]
You can’t perform that action at this time.
0 commit comments