[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-API] [PATCH] Add function to Date module to assert ISO 8601 datetime values are UTC
Bits of it aren't threadsafe (although this use might be), but in general it definitely isnt. You could replace this use with a Scanf.sscanf easily enough I think? -anil On 1 Sep 2010, at 17:22, Dave Scott wrote: > Hi Rob, > > Is the Str module threadsafe? ISTR there was something dodgy about it in a > threaded environment. > >> +let assert_utc x = >> + let r = Str.regexp "^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]T[0- >> 9][0-9]:[0-9][0-9]:[0-9][0-9]Z$" in >> + if not (Str.string_match r x 0) then >> + invalid_arg x >> + > > > Cheers, > Dave > > _______________________________________________ > xen-api mailing list > xen-api@xxxxxxxxxxxxxxxxxxx > http://lists.xensource.com/mailman/listinfo/xen-api > _______________________________________________ xen-api mailing list xen-api@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |