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

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -