c# - Create a time Offset from string with NodaTime -
i have string represents offset of particular customer. example utc+1:00
. offset relative utc, string start utc
followed +
or -
, offset in format hh:mm
.
the question is, how can take string , convert offset? not want date , time object offset applied, want object symbolizes offset, can later apply date, different altogether.
at title says, i'm looking use nodatime this.
it sounds want:
var pattern = offsetpattern.createwithinvariantculture("'utc'+h:mm"); var offset = pattern.parse(text).value;
Comments
Post a Comment